diff --git a/Simulation/BeamEffects/python/BeamEffectsConfig.py b/Simulation/BeamEffects/python/BeamEffectsConfig.py
index 237f1a6750a667fe8431f0d4ab48b7a943e45a2a..23a6f351f7ee08078293cb65f06cdcd5e79f8fb9 100644
--- a/Simulation/BeamEffects/python/BeamEffectsConfig.py
+++ b/Simulation/BeamEffects/python/BeamEffectsConfig.py
@@ -112,7 +112,12 @@ def getGenEventRotator(name="GenEventRotator", **kwargs):
 #--------------------------------------------------------------------------------------------------
 ## Algorithms
 def getBeamEffectsAlg(name="BeamEffectsAlg", **kwargs):
-    kwargs.setdefault('InputMcEventCollection', 'GEN_EVENT')
+    from AthenaCommon.DetFlags import DetFlags
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if athenaCommonFlags.DoFullChain() and DetFlags.pileup.any_on():
+        kwargs.setdefault('InputMcEventCollection', 'OriginalEvent_SG+GEN_EVENT') # For Fast Chain
+    else:
+        kwargs.setdefault('InputMcEventCollection', 'GEN_EVENT')
     kwargs.setdefault('OutputMcEventCollection', 'BeamTruthEvent')
     from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("ISFRun", simFlags.ISFRun()) #FIXME Temporary property so that we don't change the output in the initial switch to this code.
diff --git a/Simulation/Digitization/python/DigiAlgConfig.py b/Simulation/Digitization/python/DigiAlgConfig.py
index 3c7d396f346058659f22f5db89fcc36816b52dbe..cbac1ef3a7fc309e34954d5d8704aa744a862759 100644
--- a/Simulation/Digitization/python/DigiAlgConfig.py
+++ b/Simulation/Digitization/python/DigiAlgConfig.py
@@ -1,6 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 
 #####################################
 ##     Test PileUpTool methods     ##
@@ -27,7 +28,20 @@ def getStandardTruthPileUpTools():
     from AthenaCommon.DetFlags import DetFlags
     PileUpToolsList = []
     if DetFlags.pileup.Truth_on():
-        PileUpToolsList += [ "MergeMcEventCollTool" ]
+        from Digitization.DigitizationFlags import digitizationFlags
+        if 'NewMerge' in digitizationFlags.experimentalDigi():
+            if not athenaCommonFlags.DoFullChain():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_Signal" ]
+            if digitizationFlags.doLowPtMinBias.get_Value():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_MinBias" ]
+            if digitizationFlags.doHighPtMinBias.get_Value():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_HighPtMinBias" ]
+            if digitizationFlags.doCavern.get_Value():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_Cavern" ]
+            if digitizationFlags.doBeamGas.get_Value() or digitizationFlags.doBeamHalo.get_Value():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_HaloGas" ]
+        else:
+            PileUpToolsList += [ "MergeMcEventCollTool" ]
         PileUpToolsList += [ "MergeTruthJetsTool" ]
         if DetFlags.writeRDOPool.Muon_on(): #possibly this should be digitize.Muon_on()
             PileUpToolsList += [ "MergeTrackRecordCollTool" ]
@@ -39,9 +53,14 @@ def getStandardSignalOnlyTruthPileUpTools():
     from AthenaCommon.DetFlags import DetFlags
     PileUpToolsList = []
     if DetFlags.pileup.Truth_on():
-        PileUpToolsList += [ "SignalOnlyMcEventCollTool" ]
+        from Digitization.DigitizationFlags import digitizationFlags
+        if 'NewMerge' in digitizationFlags.experimentalDigi():
+            if not athenaCommonFlags.DoFullChain():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_Signal" ]
+        else:
+            PileUpToolsList += [ "SignalOnlyMcEventCollTool" ]
         PileUpToolsList += [ "MergeTruthJetsTool" ]
-        if DetFlags.writeRDOPool.Muon_on(): #possibly this should be digitize.Muon_on()
+        if not athenaCommonFlags.DoFullChain() and DetFlags.writeRDOPool.Muon_on(): #possibly this should be digitize.Muon_on()
             PileUpToolsList += [ "MergeTrackRecordCollTool" ]
         if DetFlags.writeRDOPool.Calo_on(): #possibly this should be digitize.Calo_on()
             PileUpToolsList += [ "MergeCalibHitsTool" ]
@@ -51,9 +70,22 @@ def getStandardInTimeOnlyTruthPileUpTools():
     from AthenaCommon.DetFlags import DetFlags
     PileUpToolsList = []
     if DetFlags.pileup.Truth_on():
-        PileUpToolsList += [ "InTimeOnlyMcEventCollTool" ]
+        from Digitization.DigitizationFlags import digitizationFlags
+        if 'NewMerge' in digitizationFlags.experimentalDigi():
+            if not athenaCommonFlags.DoFullChain():
+                PileUpToolsList += [ "NewMergeMcEventCollTool_Signal" ]
+            if digitizationFlags.doLowPtMinBias.get_Value():
+                PileUpToolsList += [ "InTimeOnlyNewMergeMcEventCollTool_MinBias" ]
+            if digitizationFlags.doHighPtMinBias.get_Value():
+                PileUpToolsList += [ "InTimeOnlyNewMergeMcEventCollTool_HighPtMinBias" ]
+            if digitizationFlags.doCavern.get_Value():
+                PileUpToolsList += [ "InTimeOnlyNewMergeMcEventCollTool_Cavern" ]
+            if digitizationFlags.doBeamGas.get_Value() or digitizationFlags.doBeamHalo.get_Value():
+                PileUpToolsList += [ "InTimeOnlyNewMergeMcEventCollTool_HaloGas" ]
+        else:
+            PileUpToolsList += [ "InTimeOnlyMcEventCollTool" ]
         PileUpToolsList += [ "MergeTruthJetsTool" ]
-        if DetFlags.writeRDOPool.Muon_on(): #possibly this should be digitize.Muon_on()
+        if not athenaCommonFlags.DoFullChain() and DetFlags.writeRDOPool.Muon_on(): #possibly this should be digitize.Muon_on()
             PileUpToolsList += [ "MergeTrackRecordCollTool" ]
         if DetFlags.writeRDOPool.Calo_on(): #possibly this should be digitize.Calo_on()
             PileUpToolsList += [ "MergeCalibHitsTool" ]
@@ -147,6 +179,22 @@ def getSplitInDetPileUpTools():
         PileUpToolsList += [ "TRTDigitizationToolPU" ]
     return PileUpToolsList
 
+def getSplitSFInDetPileUpTools():
+    from AthenaCommon.DetFlags import DetFlags
+    PileUpToolsList = []
+    if DetFlags.digitize.BCM_on():
+        PileUpToolsList += [ "BCM_DigitizationTool" ]
+    if DetFlags.digitize.pixel_on():
+        PileUpToolsList += [ "PixelDigitizationToolHS" ]
+        PileUpToolsList += [ "PixelFastDigitizationToolPU" ]
+    if DetFlags.digitize.SCT_on():
+        PileUpToolsList += [ "SCT_DigitizationToolHS" ]
+        PileUpToolsList += [ "SCT_FastDigitizationToolPU" ]
+    if DetFlags.digitize.TRT_on():
+        PileUpToolsList += [ "TRTDigitizationToolHS" ]
+        PileUpToolsList += [ "TRTFastDigitizationToolPU" ]
+    return PileUpToolsList
+
 def getSplitNoMergeInDetPileUpTools():
     """ This is for testing the fast chain with full digitization in split PU mode without
 merging pileup
@@ -347,6 +395,22 @@ def getSplitPileUpToolsList():
     PileUpToolsList += [ "MergeRecoTimingObjTool" ]
     return PileUpToolsList
 
+def getSplitSFPileUpToolsList():
+    PileUpToolsList = []
+    ## Truth information
+    PileUpToolsList += getStandardTruthPileUpTools()
+    ## Forward Detector Digitization
+    PileUpToolsList += getStandardForwardPileUpTools()
+    ## Inner Detector Digitization - non-standard
+    PileUpToolsList += getSplitSFInDetPileUpTools()
+    ## Calo Digitization
+    PileUpToolsList += getStandardCaloPileUpTools()
+    ## Muon System Digitization
+    PileUpToolsList += getStandardMuonPileUpTools()
+    ## RecoTimingObj
+    PileUpToolsList += [ "MergeRecoTimingObjTool" ]
+    return PileUpToolsList
+
 def getSplitNoMergePileUpToolsList():
     PileUpToolsList = []
     ## Truth information
@@ -427,6 +491,10 @@ def getSplitPileUpToolsAlg(name="SplitPileUpToolsAlg", **kwargs):
     kwargs.setdefault('PileUpTools', getSplitPileUpToolsList() )
     return getStandardPileUpToolsAlg(name, **kwargs)
 
+def getSplitSFPileUpToolsAlg(name="SplitSFPileUpToolsAlg", **kwargs):
+    kwargs.setdefault('PileUpTools', getSplitSFPileUpToolsList() )
+    return getStandardPileUpToolsAlg(name, **kwargs)
+
 def getStandardSignalOnlyTruthPileUpToolsAlg(name="StandardSignalOnlyTruthPileUpToolsAlg", **kwargs):
     kwargs.setdefault('PileUpTools', getStandardSignalOnlyTruthPileUpToolsList() )
     return getStandardPileUpToolsAlg(name, **kwargs)
diff --git a/Simulation/Digitization/python/DigiOutput.py b/Simulation/Digitization/python/DigiOutput.py
index 0b4f1521e7f72d0ead983851028597fdcfe7a8f3..08e7afa176661d4f3fefd80471161bff3f1fe59b 100644
--- a/Simulation/Digitization/python/DigiOutput.py
+++ b/Simulation/Digitization/python/DigiOutput.py
@@ -34,7 +34,7 @@ def getStreamRDO_ItemList(log):
         if standardDigiConfig():
             noFastDigi = set(keys).isdisjoint(set(digitizationFlags.experimentalDigi()))
         else:
-            noFastDigi = set(['SplitNoMergeFFPileUpToolsAlg', 'SplitNoMergeSFPileUpToolsAlg', 'SplitNoMergeFSPileUpToolsAlg', 'FastPileUpToolsAlg']).isdisjoint(set([digitizationFlags.digiSteeringConf.get_Value()]))
+            noFastDigi = set(['SplitNoMergeFFPileUpToolsAlg', 'SplitNoMergeSFPileUpToolsAlg', 'SplitNoMergeFSPileUpToolsAlg', 'FastPileUpToolsAlg', 'SplitSFPileUpToolsAlg']).isdisjoint(set([digitizationFlags.digiSteeringConf.get_Value()]))
         return not noFastDigi
 
     def fastPixelDigiOutputExpected():
diff --git a/Simulation/Digitization/python/DigitizationConfigDb.py b/Simulation/Digitization/python/DigitizationConfigDb.py
index a791db8ec48534ca9d14fde3238da646dd2ac514..e95e5364e89d3f22999b0c6fb9d92c3623c7075b 100644
--- a/Simulation/Digitization/python/DigitizationConfigDb.py
+++ b/Simulation/Digitization/python/DigitizationConfigDb.py
@@ -30,6 +30,7 @@ addService("Digitization.PileUpConfig.getPileUpEventLoopMgr"         , "PileUpEv
 addAlgorithm("Digitization.DigiAlgConfig.getStandardPileUpToolsAlg"  , "StandardPileUpToolsAlg")
 addAlgorithm("Digitization.DigiAlgConfig.getFastPileUpToolsAlg"      , "FastPileUpToolsAlg")
 addAlgorithm("Digitization.DigiAlgConfig.getSplitPileUpToolsAlg"     , "SplitPileUpToolsAlg")
+addAlgorithm("Digitization.DigiAlgConfig.getSplitSFPileUpToolsAlg"  , "SplitSFPileUpToolsAlg")
 addAlgorithm("Digitization.DigiAlgConfig.getStandardSignalOnlyTruthPileUpToolsAlg"  , "StandardSignalOnlyTruthPileUpToolsAlg")
 addAlgorithm("Digitization.DigiAlgConfig.getStandardInTimeOnlyTruthPileUpToolsAlg"  , "StandardInTimeOnlyTruthPileUpToolsAlg")
 addAlgorithm("Digitization.DigiAlgConfig.getStandardInTimeOnlyGeantinoTruthPileUpToolsAlg"  , "StandardInTimeOnlyGeantinoTruthPileUpToolsAlg")
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_FastChain_mc16a_ttbar.sh b/Simulation/FastSimulation/FastChainPileup/test/test_FastChain_mc16a_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f0782d6be62f671d3153cc0e53cd582f9479d942
--- /dev/null
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_FastChain_mc16a_ttbar.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# art-description: Run AFII simulation and full digitization of an MC16a ttbar sample with 2016a geometry and conditions, 25ns pile-up
+# art-type: grid
+# art-include: 21.3/Athena
+# art-output: mc16a_ttbar.RDO.pool.root
+# art-output: config.txt
+
+HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*"
+LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
+
+
+FastChain_tf.py \
+    --simulator ATLFASTII \
+    --digiSteeringConf "Split" \
+    --useISF True \
+    --randomSeed 123 \
+    --enableLooperKiller True \
+    --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 \
+    --outputRDOFile RDO.pool.root \
+    --maxEvents 10 \
+    --skipEvents 0 \
+    --geometryVersion default:ATLAS-R2-2016-01-00-01 \
+    --conditionsTag default:OFLCOND-MC16-SDR-16 \
+    --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True;from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.experimentalDigi=["NewMerge"]' \
+    --preExec 'EVNTtoRDO:ToolSvc.NewMergeMcEventCollTool.OutputLevel=VERBOSE;' \
+    --postInclude='PyJobTransforms/UseFrontier.py' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt");ServiceMgr.MessageSvc.Format = "% F%32W%S%7W%R%T %0W%M"' \
+    --DataRunNumber '284500' \
+    --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
+    --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \
+    --pileupFinalBunch '6' \
+    --numberOfHighPtMinBias '0.116075313' \
+    --numberOfLowPtMinBias '44.3839246425' \
+    --numberOfCavernBkg 0 \
+    --imf False
+echo "art-result: $? EVNTtoRDO step"
+
+# Add Reco step?
+
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo  "art-result: $? regression"
+
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh
index 33fdf9bca36e3dfeda29cf58a1effd2e24ae016c..63d071a824797ae2ead1f8c051e670f4ef72da51 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh
@@ -5,8 +5,8 @@
 # specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" \
@@ -24,36 +24,35 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
-    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;'
+    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 Reco_tf.py --inputRDOFile='RDO_pileup_fastsim_fulldigi.pool.root'\
  --outputAODFile=AOD_fastSim_fullDigi.pool.root \
     --autoConfiguration=everything \
-    --maxEvents=500 \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --maxEvents 100 \
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? ESD step"
+echo "art-result: $? RDOtoAOD step"
 
 
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
 #Regression test
 
 ArtPackage=$1
 ArtJobName=$2
 
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 
 echo  "art-result: $? regression"
 
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_stdReco_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_stdReco_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_stdReco_fastSim_fullDigi_InDetStandardPlots.root
 
+# art-output: dcube/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php 
 echo "art-result: $? histcompArtPackage
-
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh
index 8a4a66a8599ff2e91262745d2d7fce6b4ca4d58f..017455f5f84f3beaf88e01b9dca557bb4f5e46d7 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh
@@ -3,12 +3,12 @@
 # art-description: test job ttFC_fullSim_fullDigi
 # art-type: grid
 
-# specify branches of athena that are being targeted:                                                               
+# specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
-# art-include: 21.3-hmpl/Athena
 FastChain_tf.py --simulator ATLFASTII \
     --digiSteeringConf "SplitNoMerge" \
     --useISF True \
@@ -23,28 +23,29 @@ FastChain_tf.py --simulator ATLFASTII \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
-    --DataRunNumber '284500'
+    --DataRunNumber '284500' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 Reco_tf.py --inputRDOFile=RDO_pileup_fullsim_fulldigi.pool.root \
     --outputAODFile=AOD_fullSim_fullDigi.pool.root \
     --autoConfiguration=everything \
     --maxEvents=500 \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? ESD step"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
+echo "art-result: $? RDOtoAOD step"
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --imf=False --entries 10 ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_stdReco_fullSim_fullDigi.sh InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_stdReco_fullSim_fullDigi.sh InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_stdReco_fullSim_fullDigi_InDetStandardPlots.root
 
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
+
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh
index adf490505c801e3de7cf4a223d3410938bc07ec7..28558f99123aa6c3b49e23d8aa2aaa2bdf9a0f72 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh
@@ -2,12 +2,11 @@
 # art-description: test ttFC_fastSim_fastDigi
 # art-type: grid
 
-# specify branches of athena that are being targeted:                                                               
+# specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
-
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl                                                                           
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMergeFF" \
     --useISF True \
@@ -21,23 +20,22 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
-    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py"
+    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? evgen to RDO step"
+echo "art-result: $? EVNTtoRDO step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: RDO_truth.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fastSim_fastDigi RDO_truth.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/RDOTruthCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/RDO_TruthPlots_Refs/test_ttFC_fastSim_fastDigi_RDO_Truth.root
+
 
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh
index e7f4528d9ead7526d6941b453c6b9e564d47bd2d..ff3ed5083f0343e8a11f8b896f81875c3a9cccca 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh
@@ -6,9 +6,7 @@
 #
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-#
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" \
@@ -25,21 +23,20 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
-    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' 
+    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
-echo "art-result: $? evgen step"
+echo "art-result: $? EVNTtoRDO step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: RDO_truth.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fastSim_fullDigi RDO_truth.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/RDOTruthCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/RDO_TruthPlots_Refs/test_ttFC_fastSim_fullDigi.sh
+
 
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh
index 5af40184fa23b68b8d2fe7dfd4c31a8ab2474a39..a250d913c14cdca81ecee92946fed6ba0896b063 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh
@@ -5,12 +5,10 @@
 #
 # Run FastChain 'Fast PU, Full HS' and tests: G4HS_FastPileup sim (G4 for HS, Pythia on the fly + FastCaloSim for PU) + fast digi PU/full digi HS + Split reco (truth tracking PU, full HS)
 #
-# specify branches of athena that are being targeted: 
+# specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-#                                                                           
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
 
 FastChain_tf.py --simulator G4HS_FastPileup \
     --digiSteeringConf "SplitNoMergeSF" \
@@ -26,22 +24,20 @@ FastChain_tf.py --simulator G4HS_FastPileup \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
-    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py"
+    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? Job"
+echo "art-result: $? EVNTtoRDO step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --imf=False --entries 10 ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fullHS_fastPU InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: RDO_truth.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fullHS_fastPU RDO_truth.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/RDOTruthCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/RDO_TruthPlots_Refs/test_ttFC_fullHS_fastPU_simDigi_RDO_Truth.root
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh
index 338444789eb5396eb819019dbfe4ea042908cef1..d469555ae7ad2177b0900acc00ffe66d43fac02f 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh
@@ -2,12 +2,11 @@
 # art-type: grid
 # art-description: test job ttFC_fullSim_fullDigi
 
-# specify branches of athena that are being targeted:                                                             
- 
+# specify branches of athena that are being targeted:
+
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
 
 FastChain_tf.py --simulator ATLFASTII \
     --digiSteeringConf "SplitNoMerge" \
@@ -22,20 +21,18 @@ FastChain_tf.py --simulator ATLFASTII \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
-    --DataRunNumber '284500'
+    --DataRunNumber '284500' \
+    --imf False
 
-echo "art-result: $? evgen step"
+echo "art-result: $? EVNTtoRDO step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fullSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: RDO_truth.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fullSim_fullDigi RDO_truth.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/RDOTruthCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/RDO_truth_TEST.root
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh
index 5960ca58ad649c251f386ee55fb53dc74a097caa..b0b4b9860ecf3e5a1819df0513f6c4b53ddfcd67 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh
@@ -1,13 +1,12 @@
-B41;326;0c#!/usr/bin/env bash
+#!/usr/bin/env bash
 # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_Split_fastSim_fastDigi
 # art-type: grid
 
-# specify branches of athena that are being targeted: 
+# specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMergeFF" \
@@ -22,12 +21,13 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
     --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 
 FastChain_tf.py --maxEvents 50 \
@@ -36,22 +36,21 @@ FastChain_tf.py --maxEvents 50 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \
     --outputAODFile AOD_Split_fastSim_fastDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")'\
+    --imf False
 
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml
- /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_Split_fastSim_fastDigi_InDetStandardPlots.root
+
 
+# art-output: dcube/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh
index 29d2937510d1ff6de0797bb2b745f822b868d8cd..78f0e9c82a2b425788900ddfeab99b2ef6e3c71e 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh
@@ -5,8 +5,8 @@
 # specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena       
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" --useISF True \
@@ -20,12 +20,14 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
-    --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
 
-echo "art-result: $? AOD step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -33,21 +35,21 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31  \
     --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \
     --outputAODFile AOD_Split_fastSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True); from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);"
+    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True); from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} 
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
 
 
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_Split_fastSim_fullDigi_InDetStandardPlots.root
+
+# art-output: dcube/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh
index 34d1505b352a7ea461825b27dc772d96d262185a..05141804e5724ff8b0e002216d02989bdb63a3cf 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh
@@ -5,9 +5,8 @@
 # specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
- 
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 # Run FastChain 'Fast PU, Full HS' and tests: G4HS_FastPileup sim (G4 for HS, Pythia on the fly + FastCaloSim for PU) + fast digi PU/full digi HS + Split reco (truth tracking PU, full HS)
 
 FastChain_tf.py --simulator G4HS_FastPileup \
@@ -23,12 +22,13 @@ FastChain_tf.py --simulator G4HS_FastPileup \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
-    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py"
+    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 10 \
     --skipEvents 0 \
@@ -37,22 +37,23 @@ FastChain_tf.py --maxEvents 10 \
     --inputRDOFile 'RDO_fullHS_fastPU_simdigi.pool.root' \
     --outputAODFile AOD_Split_fullHS_fastPU_simDigi.pool.root \
     --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);InDetFlags.doStatistics.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True); from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" \
-    --postExec 'RAWtoESD:import AthenaCommon.AlgSequence as acas;job = acas.AlgSequence();del job.InDetSCT_ClusterizationPU;del job.InDetPixelClusterizationPU;del job.InDetPRD_MultiTruthMakerSiPU;del job.InDetPRD_MultiTruthMakerTRTPU;'
+    --postExec 'RAWtoESD:import AthenaCommon.AlgSequence as acas;job = acas.AlgSequence();del job.InDetSCT_ClusterizationPU;del job.InDetPixelClusterizationPU;del job.InDetPRD_MultiTruthMakerSiPU;del job.InDetPRD_MultiTruthMakerTRTPU;from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} 
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fullHS_fastPU_simDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_RDO_truth_pileup.xml_ttFC_reco_Split_fullHS_fastPU_simDigi /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_Split_fullHS_fastPU_simDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/RDOTruthCompare.xml_ttFC_reco_Split_fullHS_fastPU_simDigi /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_Split_fullHS_fastPU_simDigi_InDetStandardPlots.root
 
 
 
 
 # InDetStandardPlots.root -l dcube.log -p -r   -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/
 
-# art-output: dcube/ 
+# art-output: dcube/
 # dumps the entire dcube directory to output because we need all of it for plots
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh
index 334f7515d01cf3d6b3b4f3e4c8c0be3614f0e535..f4865d3828d1037bb09207b69a1084afcc03910e 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh
@@ -2,11 +2,8 @@
 # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_newTracking_PseudoT_fastSim_fastDigi
 # art-type: grid
 # specify branches of athena that are being targeted:
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
 
+# art-output: config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMergeFF" \
@@ -22,12 +19,13 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
-    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py"
+    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -35,17 +33,18 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \
     --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fastDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}  
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
 
-#add an additional payload from the job (corollary file).                                                           
+#add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
 
 /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh
index 40dc6e0e2d4f6ad9f81db47ef4585a74b64e872f..fa369be97cd99eb0206766541a2d010718e8c3fc 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh
@@ -1,12 +1,11 @@
-B41;326;0c#!/usr/bin/env bash
+#!/usr/bin/env bash
 # art-description: test for job configuration ttFC_fastSim_fulldigi then ttFC_reco_newTracking_PseudoT_fastSim_fullDigi
 # art-type: grid
 #
-# specify branches of athena that are being targeted:                                                               
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl                                                                           
-# art-include: 21.3-hmpl/Athena
+# specify branches of athena that are being targeted:
+
+# art-output: config.txt
+
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" \
     --useISF True \
@@ -23,10 +22,11 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
-    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' 
+    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -34,16 +34,17 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31  \
     --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \
     --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
 
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root 
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
 /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
 
 
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh
index b8ff769abc50e14e2741ca78823cc1efcc6d3bbd..09d0f409fda3c80850abba5a6c9ec992e7f37ecc 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh
@@ -3,11 +3,8 @@
 # art-description: test job ttFC_fullSim_fullDigi + ttFC_reco_newTracking_PseudoT_fullSim_fullDigi
 
 # specify branches of athena that are being targeted:
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
 
+# art-output: config.txt
 
 FastChain_tf.py --simulator ATLFASTII \
     --digiSteeringConf "SplitNoMerge" \
@@ -23,9 +20,10 @@ FastChain_tf.py --simulator ATLFASTII \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
-    --DataRunNumber '284500'
+    --DataRunNumber '284500' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -33,15 +31,16 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31  \
     --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \
     --outputAODFile AOD_newTracking_pseudoTracking_fullSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --imf False
 
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
+#add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
 /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
 
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh
index a1df8650a377bcc1bbc2f1562b3da7527f1de54b..e0af2c79b9a9676bd08043059b00883934fa65c4 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh
@@ -3,10 +3,7 @@
 # art-type: grid
 
 # specify branches of athena that are being targeted:
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMergeFF" \
@@ -22,12 +19,13 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
-    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py"
+    --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -35,14 +33,16 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \
     --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fastDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);"
-echo "art-result: $? AOD step"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);" \
+    --imf False
+
+echo "art-result: $? RDOtoAOD step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
+#add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
 /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
 
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh
index 2e8479731e7cef7fe465789f51a4b5fbd1237d4c..fb1ce5ed7938f26636d80b374b3d1c21d42dce67 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh
@@ -3,10 +3,9 @@
 # art-type: grid
 #
 # specify branches of athena that are being targeted:
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+
+# art-output: config.txt
+
 # Sim/Digi job
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" \
@@ -24,9 +23,10 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
-    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' 
+    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 
 FastChain_tf.py --maxEvents 500 \
@@ -35,12 +35,14 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31  \
     --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \
     --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
-echo "art-result: $? AOD step"
+    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --imf False
+
+echo "art-result: $? RDOtoAOD step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
 # add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh
index 4c8e166c683d5231821be26cfe6f80fa0046d7ea..a22820c0bec32e60a39b66dcb80261d72d8a943c 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh
@@ -3,10 +3,8 @@
 # art-description: test job ttFC_fullSim_fullDigi + ttFC_reco_noSplit_PseudoT_fullSim_fullDigi
 
 # specify branches of athena that are being targeted:
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena       
+
+# art-output: config.txt
 
 FastChain_tf.py --simulator ATLFASTII \
     --digiSteeringConf "SplitNoMerge" \
@@ -22,9 +20,10 @@ FastChain_tf.py --simulator ATLFASTII \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
-    --DataRunNumber '284500'
+    --DataRunNumber '284500' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 
 FastChain_tf.py --maxEvents 500 \
@@ -33,16 +32,17 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \
     --outputAODFile AOD_noSplit_pseudoTracking_fullSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? RDOtoAOD step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
 /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
 
 
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh
index c73f55919d939f2bc8eec005828926c294ac6a0b..12d9edc168d34d0227a127a5db2a93e3740aee97 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh
@@ -5,8 +5,9 @@
 # specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
+
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMergeFF" \
     --useISF True \
@@ -20,12 +21,13 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --preSimInclude FastChainPileup/FastPileup.py \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
-    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
+    --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
     --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
     --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 
 FastChain_tf.py --maxEvents 500 \
@@ -34,25 +36,25 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \
     --outputAODFile AOD_noSplit_noPseudoT_fastSim_fastDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
+#add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi_InDetStandardPlots.root
 
 
 
 
 # InDetStandardPlots.root -l dcube.log -p -r   -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
+
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh
index fe32cb3bbfa4a7d8a67ccdc6370ca07aa0ddf2be..8215988e4df516ce01d9a11a9430c69a4b3d75b9 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh
@@ -1,12 +1,12 @@
-B41;326;0c#!/usr/bin/env bash
+#!/usr/bin/env bash
 # art-description: test for job configuration ttFC_fastSim_fulldigi _ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi
 # art-type: grid
 #
 # specify branches of athena that are being targeted:
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
 FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --digiSteeringConf "SplitNoMerge" \
@@ -24,9 +24,10 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
     --DataRunNumber '284500' \
-    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' 
+    --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 
 FastChain_tf.py --maxEvents 500 \
@@ -35,21 +36,20 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \
     --outputAODFile AOD_noSplit_noPseudoT_fastSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? RDOtoAOD step"
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
+#add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi_InDetStandardPlots.root
 
 
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh
index 2b286a1f446cdf230a29ee8d7eb0544f9e19e540..c5bda866c792c110aa9caa6d40a9fc01442beda8 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh
@@ -6,8 +6,8 @@
 
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+# art-output: config.txt
+# art-output: RAWtoESD_config.txt
 
 FastChain_tf.py --simulator ATLFASTII \
     --digiSteeringConf "SplitNoMerge" \
@@ -23,9 +23,10 @@ FastChain_tf.py --simulator ATLFASTII \
     --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \
     --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \
     --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \
-    --DataRunNumber '284500'
+    --DataRunNumber '284500' \
+    --imf False
 
-echo "art-result: $? RDO step"
+echo "art-result: $? EVNTtoRDO step"
 
 FastChain_tf.py --maxEvents 500 \
     --skipEvents 0 \
@@ -33,25 +34,24 @@ FastChain_tf.py --maxEvents 500 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \
     --outputAODFile AOD_noSplit_noPseudoT_fullSim_fullDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" \
+    --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("RAWtoESD_config.txt")' \
+    --imf False
 
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
-#add an additional payload from the job (corollary file).                                                           
-# art-output: InDetStandardPlots.root  
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+#add an additional payload from the job (corollary file).
+# art-output: InDetStandardPlots.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/InDetStandardPlotCompare.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi_InDetStandardPlots.root
 
 
 
 
 # InDetStandardPlots.root -l dcube.log -p -r   -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 echo  "art-result: $? histcomp"
diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh
index 9c86a3514aed470f2f20fa48539b465dc8ef048f..edcfdf7c0c514ef37abba8c4940a15c32318ad77 100755
--- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh
+++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh
@@ -1,14 +1,13 @@
 #!/usr/bin/env bash
 # art-description: Job ttFC_stdFullSim + ttFC_stdFullSimMerge + ttFC_stdFullSimDigi + ttFC_reco_noSplit_noPseudoT_stdFullSimDigi
 # art-type: grid
-# 
+#
 
 # specify branches of athena that are being targeted:
 
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
-# Also include temporary branch 21.3-hmpl
-# art-include: 21.3-hmpl/Athena
+
 # job 1: Simulation from evgen
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' \
@@ -21,9 +20,10 @@ Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' \
     --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' \
     --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" \
     --outputHITSFile "Hits.pool.root" \
-    --maxEvents 50
+    --maxEvents 50 \
+    --imf False
 
-echo "art-result: $? evgen step"
+echo "art-result: $? EVNTtoHITS step"
 
 #merging of hits file
 
@@ -32,9 +32,10 @@ HITSMerge_tf.py --inputHITSFile='Hits.pool.root' \
     --maxEvents=50 \
     --skipEvents='0' \
     --geometryVersion 'ATLAS-R2-2015-03-01-00' \
-    --conditionsTag 'OFLCOND-RUN12-SDR-19'
+    --conditionsTag 'OFLCOND-RUN12-SDR-19' \
+    --imf False
 
-echo "art-result: $? Merge step"
+echo "art-result: $? HITS Merge step"
 #digi
 Digi_tf.py --inputHITSFile 'Merge.pool.root' \
     --outputRDOFile 'RDO.pool.root' \
@@ -45,9 +46,10 @@ Digi_tf.py --inputHITSFile 'Merge.pool.root' \
     --digiSeedOffset2 '2345678' \
     --postInclude 'PyJobTransforms/UseFrontier.py' \
     --AddCaloDigi 'False' \
-    --conditionsTag 'OFLCOND-RUN12-SDR-31'
+    --conditionsTag 'OFLCOND-RUN12-SDR-31' \
+    --imf False
 
-echo "art-result: $? Digi step"
+echo "art-result: $? HITStoRDO step"
 
 FastChain_tf.py --maxEvents 50 \
     --skipEvents 0 \
@@ -55,28 +57,27 @@ FastChain_tf.py --maxEvents 50 \
     --conditionsTag OFLCOND-RUN12-SDR-31 \
     --inputRDOFile RDO.pool.root \
     --outputAODFile AOD_Split_stdFullSimDigi.pool.root \
-    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);"
+    --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);" \
+    --imf False
+
 #end of job
-echo "art-result: $? AOD step"
+echo "art-result: $? RDOtoAOD step"
 #add an additional payload from the job (corollary file).
 # art-output: InDetStandardPlots.root
 
 ArtPackage=$1
 ArtJobName=$2
-art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName}
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo  "art-result: $? regression"
 
 
-/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root
+/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_Refs/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi_InDetStandardPlots.root
 
 
 
 
 # InDetStandardPlots.root -l dcube.log -p -r   -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/
 
-# art-output: dcube/dcube.xml
-# art-output: dcube/dcube.log
-# art-output: dcube/dcubelog.xml
-# art-output: dcube/dcube.xml.php
+# art-output: dcube/
 
 echo  "art-result: $? histcomp test"
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/CMakeLists.txt b/Simulation/G4Utilities/MCTruthSimAlgs/CMakeLists.txt
index 8060abe339f59ec42ec5184608cff732c83915d9..236ea6973b55f94b11d02dc08f975b2cc6f6e87e 100644
--- a/Simulation/G4Utilities/MCTruthSimAlgs/CMakeLists.txt
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/CMakeLists.txt
@@ -10,9 +10,9 @@ atlas_depends_on_subdirs( PRIVATE
                           Calorimeter/CaloSimEvent
                           Control/AthenaBaseComps
                           Control/AthenaKernel
-                          Control/CxxUtils
                           Control/PileUpTools
                           Control/StoreGate
+                          Event/EventInfo
                           Event/xAOD/xAODJet
                           GaudiKernel
                           Generators/GeneratorObjects
@@ -25,7 +25,7 @@ atlas_depends_on_subdirs( PRIVATE
 atlas_add_component( MCTruthSimAlgs
                      src/*.cxx
                      src/components/MCTruthSimAlgs_entries.cxx
-                     LINK_LIBRARIES CaloSimEvent AthenaBaseComps AthenaKernel CxxUtils PileUpToolsLib StoreGateLib SGtests xAODJet GaudiKernel GeneratorObjects TruthUtils MuonSimEvent RecEvent )
+                     LINK_LIBRARIES CaloSimEvent AthenaBaseComps AthenaKernel PileUpToolsLib StoreGateLib SGtests xAODJet GaudiKernel GeneratorObjects TruthUtils MuonSimEvent RecEvent EventInfo)
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfig.py b/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfig.py
index 3a212e7483e9d144446a0d6deb193bd5c3e9b83a..fa0b3a1732e8fd07bf691e80fb5502b8b1f07393 100644
--- a/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfig.py
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from Digitization.DigitizationFlags import digitizationFlags
 from AthenaCommon import CfgMgr
@@ -12,46 +12,66 @@ def genericMergeMcEventCollTool(name="MergeMcEventCollTool", **kwargs):
     else:
         kwargs.setdefault("TruthCollOutputKey", "TruthEvent")
     kwargs.setdefault("TruthCollInputKey", "TruthEvent")
-    
-    kwargs.setdefault("LowTimeToKeep", -50.5)
-    kwargs.setdefault("HighTimeToKeep", 50.5)
-    kwargs.setdefault("KeepUnstable", False)
-    kwargs.setdefault("AbsEtaMax", 5.0)
-    kwargs.setdefault("OutOfTimeAbsEtaMax", 3.0)
-    kwargs.setdefault("rRange", 20.0)
-    kwargs.setdefault("zRange", 200.0)
-    #kwargs.setdefault("ptMin", 0.4*GeV)
-    #kwargs.setdefault("EKinMin", 1.0*MeV)
-    kwargs.setdefault("SaveCavernBackground", True)
-    kwargs.setdefault("SaveInTimeMinBias", True)
-    kwargs.setdefault("SaveOutOfTimeMinBias", True)
-    kwargs.setdefault("SaveRestOfMinBias", False)
-    kwargs.setdefault("AddBackgroundCollisionVertices", True)
-    kwargs.setdefault("CompressOutputCollection", False)
-
-    return CfgMgr.MergeMcEventCollTool(name, **kwargs)
+    if 'SimpleMerge' in digitizationFlags.experimentalDigi():
+        if not digitizationFlags.doXingByXingPileUp(): # Algorithm approach
+            kwargs.setdefault("PileUpMergeSvc", "PileUpMergeSvc")
+        return CfgMgr.SimpleMergeMcEventCollTool(name, **kwargs)
+    elif 'NewMerge' in digitizationFlags.experimentalDigi():
+        if not digitizationFlags.doXingByXingPileUp(): # Algorithm approach
+            kwargs.setdefault("PileUpMergeSvc", "PileUpMergeSvc")
+        if digitizationFlags.doLowPtMinBias:
+            kwargs.setdefault("ExpectLowPtMinBiasBackgroundCollection", True)
+        if digitizationFlags.doHighPtMinBias:
+            kwargs.setdefault("ExpectHighPtMinBiasBackgroundCollection", True)
+        # Default `PileUpType` to "Unknown"
+        kwargs.setdefault("PileUpType", -1)
+        return CfgMgr.NewMergeMcEventCollTool(name, **kwargs)
+    else:
+        kwargs.setdefault("LowTimeToKeep", -50.5)
+        kwargs.setdefault("HighTimeToKeep", 50.5)
+        kwargs.setdefault("KeepUnstable", False)
+        kwargs.setdefault("AbsEtaMax", 5.0)
+        kwargs.setdefault("OutOfTimeAbsEtaMax", 3.0)
+        kwargs.setdefault("rRange", 20.0)
+        kwargs.setdefault("zRange", 200.0)
+        #kwargs.setdefault("ptMin", 0.4*GeV)
+        #kwargs.setdefault("EKinMin", 1.0*MeV)
+        kwargs.setdefault("SaveCavernBackground", True)
+        kwargs.setdefault("SaveInTimeMinBias", True)
+        kwargs.setdefault("SaveOutOfTimeMinBias", True)
+        kwargs.setdefault("SaveRestOfMinBias", False)
+        kwargs.setdefault("AddBackgroundCollisionVertices", True)
+        kwargs.setdefault("CompressOutputCollection", False)
+        #kwargs.setdefault("CopyCompleteGenEvents", True)
+        return CfgMgr.MergeMcEventCollTool(name, **kwargs)
 
 def MergeMcEventCollTool(name="MergeMcEventCollTool", **kwargs):
     if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
         kwargs.setdefault("FirstXing", -30000)
         kwargs.setdefault("LastXing",   30000)
-    kwargs.setdefault("DoSlimming", True)
-    kwargs.setdefault("OnlySaveSignalTruth", False)
+    keys =['SimpleMerge', 'NewMerge']
+    if set(keys).isdisjoint(set(digitizationFlags.experimentalDigi())):
+        kwargs.setdefault("DoSlimming", False)
+        kwargs.setdefault("OnlySaveSignalTruth", False)
     return genericMergeMcEventCollTool(name, **kwargs)
 
 def SignalOnlyMcEventCollTool(name="SignalOnlyMcEventCollTool", **kwargs):
     if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
         kwargs.setdefault("FirstXing", 0)
         kwargs.setdefault("LastXing",  0)
-    kwargs.setdefault("OnlySaveSignalTruth", True)
+    keys =['SimpleMerge', 'NewMerge']
+    if set(keys).isdisjoint(set(digitizationFlags.experimentalDigi())):
+        kwargs.setdefault("OnlySaveSignalTruth", True)
     return genericMergeMcEventCollTool(name, **kwargs)
 
 def InTimeOnlyMcEventCollTool(name="InTimeOnlyMcEventCollTool", **kwargs):
     if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
         kwargs.setdefault("FirstXing", 0)
         kwargs.setdefault("LastXing",  0)
-    kwargs.setdefault("DoSlimming", False)
-    kwargs.setdefault("OnlySaveSignalTruth", False)
+    keys =['SimpleMerge', 'NewMerge']
+    if set(keys).isdisjoint(set(digitizationFlags.experimentalDigi())):
+        kwargs.setdefault("DoSlimming", False)
+        kwargs.setdefault("OnlySaveSignalTruth", False)
     return genericMergeMcEventCollTool(name, **kwargs)
 
 ############################################################################
@@ -79,12 +99,125 @@ def getMergeTruthJetsTool(name="MergeTruthJetsTool", **kwargs):
     if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
         kwargs.setdefault("FirstXing", TruthJet_FirstXing() )
         kwargs.setdefault("LastXing",  TruthJet_LastXing() )
+    #kwargs.setdefault("OutputLevel",  1 )
+
     return CfgMgr.MergeTruthJetsTool(name, **kwargs)
 
 def getMergeTruthJetsFilterTool(name="MergeTruthJetsFilterTool", **kwargs):
     kwargs.setdefault("ActivateFilter", True )
     return getMergeTruthJetsTool(name, **kwargs)
 
+def getNewMergeMcEventCollTool_Base(name="NewMergeMcEventCollTool_Base", **kwargs):
+    if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
+        kwargs.setdefault("FirstXing", -30000)
+        kwargs.setdefault("LastXing",   30000)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent")
+    kwargs.setdefault("TruthCollInputKey", "TruthEvent")
+    if not digitizationFlags.doXingByXingPileUp(): # Algorithm approach
+        kwargs.setdefault("PileUpMergeSvc", "PileUpMergeSvc")
+    # Default `PileUpType` to "Unknown"
+    kwargs.setdefault("PileUpType", -1)
+    return CfgMgr.NewMergeMcEventCollTool(name, **kwargs)
+
+def getNewMergeMcEventCollTool_Signal(name="NewMergeMcEventCollTool_Signal", **kwargs):
+    if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
+        kwargs.setdefault("FirstXing", 0)
+        kwargs.setdefault("LastXing",  0)
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.Signal)
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+### All bunch-crossing pileup `NewMergeMcEventCollTool`s
+def getNewMergeMcEventCollTool_MinBias(name="NewMergeMcEventCollTool_MinBias", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.MinimumBias)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_PU")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_PU")
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getNewMergeMcEventCollTool_HighPtMinBias(name="NewMergeMcEventCollTool_HighPtMinBias", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.HighPtMinimumBias)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_HighPtPU")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_HighPtPU")
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getNewMergeMcEventCollTool_Cavern(name="NewMergeMcEventCollTool_Cavern", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.Cavern)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_Cavern")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_Cavern")
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getNewMergeMcEventCollTool_HaloGas(name="NewMergeMcEventCollTool_HaloGas", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.HaloGas)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_HaloGas")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_HaloGas")
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+### InTimeOnly pileup `NewMergeMcEventCollTool`s
+def getInTimeOnlyNewMergeMcEventCollTool_Base(name="InTimeOnlyNewMergeMcEventCollTool_Base", **kwargs):
+    if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
+        kwargs.setdefault("FirstXing", 0)
+        kwargs.setdefault("LastXing",  0)
+    return getNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getInTimeOnlyNewMergeMcEventCollTool_MinBias(name="InTimeOnlyNewMergeMcEventCollTool_MinBias", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.MinimumBias)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_PU")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_PU")
+    return getInTimeOnlyNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getInTimeOnlyNewMergeMcEventCollTool_HighPtMinBias(name="InTimeOnlyNewMergeMcEventCollTool_HighPtMinBias", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.HighPtMinimumBias)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_HighPtPU")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_HighPtPU")
+    return getInTimeOnlyNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getInTimeOnlyNewMergeMcEventCollTool_Cavern(name="InTimeOnlyNewMergeMcEventCollTool_Cavern", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.Cavern)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_Cavern")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_Cavern")
+    return getInTimeOnlyNewMergeMcEventCollTool_Base(name, **kwargs)
+
+def getInTimeOnlyNewMergeMcEventCollTool_HaloGas(name="InTimeOnlyNewMergeMcEventCollTool_HaloGas", **kwargs):
+    from Digitization import PileUpEventType
+    kwargs.setdefault("PileUpType", PileUpEventType.HaloGas)
+    if 'OverlayMT' in digitizationFlags.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("TruthCollOutputKey", overlayFlags.bkgPrefix() + "TruthEvent_HaloGas")
+    else:
+        kwargs.setdefault("TruthCollOutputKey", "TruthEvent_HaloGas")
+    return getInTimeOnlyNewMergeMcEventCollTool_Base(name, **kwargs)
 
 ############################################################################
 
@@ -107,7 +240,6 @@ def getTrackRange(name="TrackRange" , **kwargs):
     #"TrackRecordCollection#CaloEntryLayer"
     return CfgMgr.PileUpXingFolder(name, **kwargs)
 
-
 def MergeTrackRecordCollTool(name="MergeTrackRecordCollTool", **kwargs):
     if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach
         kwargs.setdefault("FirstXing", TrackRecord_FirstXing() )
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfigDb.py b/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfigDb.py
index a791a0aa7b93acf47f0d6dfef60e5b6f7b83b316..0b24e4925f6248497863e8b123c051648d6a9000 100644
--- a/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfigDb.py
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/python/MCTruthSimAlgsConfigDb.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.CfgGetter import addTool
 
@@ -21,10 +21,18 @@ addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeRecoTimingObjTool"         , "
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeHijingParsTool"            , "MergeHijingParsTool")
 
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeMcEventCollTool"           , "MergeMcEventCollTool")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.getNewMergeMcEventCollTool_Signal"        , "NewMergeMcEventCollTool_Signal")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.getNewMergeMcEventCollTool_MinBias"        , "NewMergeMcEventCollTool_MinBias")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.getNewMergeMcEventCollTool_HighPtMinBias"        , "NewMergeMcEventCollTool_HighPtMinBias")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.getNewMergeMcEventCollTool_Cavern"        , "NewMergeMcEventCollTool_Cavern")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.getNewMergeMcEventCollTool_HaloGas"        , "NewMergeMcEventCollTool_HaloGas")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.NewMergeMcEventCollTool"        , "InTimeOnlyNewMergeMcEventCollTool_MinBias")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.NewMergeMcEventCollTool"        , "InTimeOnlyNewMergeMcEventCollTool_HighPtMinBias")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.NewMergeMcEventCollTool"        , "InTimeOnlyNewMergeMcEventCollTool_Cavern")
+addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.NewMergeMcEventCollTool"        , "InTimeOnlyNewMergeMcEventCollTool_HaloGas")
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.SignalOnlyMcEventCollTool"      , "SignalOnlyMcEventCollTool")
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.InTimeOnlyMcEventCollTool"      , "InTimeOnlyMcEventCollTool")
 
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeGenericMuonSimHitCollTool" , "MergeGenericMuonSimHitCollTool")
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeMicromegasSimHitCollTool"  , "MergeMicromegasSimHitCollTool")
 addTool("MCTruthSimAlgs.MCTruthSimAlgsConfig.MergeSTGCSimHitCollTool"        , "MergeSTGCSimHitCollTool")
-
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b9009cb480388f2fd0576c4060502d98a47d6caf
--- /dev/null
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.cxx
@@ -0,0 +1,177 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "NewMergeMcEventCollTool.h"
+#include "EventInfo/EventType.h"
+#include "EventInfo/PileUpTimeEventIndex.h"
+#include <fstream>
+
+NewMergeMcEventCollTool::NewMergeMcEventCollTool(const std::string& type,
+                                                 const std::string& name,
+                                                 const IInterface *parent) :
+  PileUpToolBase(type, name, parent)
+{
+  declareProperty("TruthCollInputKey",   m_truthCollInputKey);
+  declareProperty("PileUpType", m_pileUpType);
+}
+
+StatusCode NewMergeMcEventCollTool::initialize()
+{
+  if(!m_pMergeSvc.empty())
+    {
+      ATH_CHECK(m_pMergeSvc.retrieve());
+    }
+
+  ATH_CHECK( m_truthCollOutputKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+/// PileUpTools Approach
+StatusCode NewMergeMcEventCollTool::prepareEvent(unsigned int nInputEvents)
+{
+  ATH_MSG_VERBOSE( this->name()<<"::prepareEvent()" );
+
+  //Check we are getting at least one event
+  if (0 == nInputEvents)
+    {
+      ATH_MSG_ERROR("prepareEvent: TimedTruthList with key "
+                    << m_truthCollInputKey.value() << " is empty");
+      return StatusCode::RECOVERABLE;
+    }
+  ATH_MSG_VERBOSE(  this->name()<<"::prepareEvent: there are " << nInputEvents << " subevents in this event.");
+
+  if (!m_outputMcEventCollection.isValid()) {
+    // Would be nice to avoid having the WriteHandle as a member
+    // variable, but this is the only way to allow multiple function
+    // calls to add information to the version of the
+    // McEventCollection in the output StoreGate
+    m_outputMcEventCollection = SG::makeHandle(m_truthCollOutputKey);
+    ATH_CHECK(m_outputMcEventCollection.record(std::make_unique<McEventCollection>()));
+  }
+  else {
+    ATH_MSG_ERROR("WriteHandle already valid??");
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode NewMergeMcEventCollTool::processBunchXing(int /*bunchXing*/,
+                                                     SubEventIterator bSubEvents,
+                                                     SubEventIterator eSubEvents)
+{
+  SubEventIterator iEvt(bSubEvents);
+  //loop over the McEventCollections (each one assumed to containing exactly one GenEvent) of the various input events
+  while (iEvt != eSubEvents)
+    {
+      StoreGateSvc& seStore(*iEvt->ptr()->evtStore());
+      const McEventCollection *pMEC(nullptr);
+      ATH_CHECK(seStore.retrieve(pMEC, m_truthCollInputKey.value()));
+      ATH_MSG_VERBOSE( this->name()<<"::processBunchXing: SubEvt McEventCollection from StoreGate " << seStore.name() << " of PileUpType " << iEvt->type() );
+      if(m_pileUpType==iEvt->type()) {
+        ATH_CHECK(this->processEvent(pMEC, m_outputMcEventCollection.ptr(), iEvt->time()));
+      }
+      ++iEvt;
+    }
+  return StatusCode::SUCCESS;
+}
+
+StatusCode NewMergeMcEventCollTool::mergeEvent()
+{
+  ATH_MSG_VERBOSE(  this->name()<<"::mergeEvent()" );
+  if(msgLvl(MSG::VERBOSE)) { this->printDetailsOfMergedMcEventCollection(m_outputMcEventCollection.ptr()); }
+  return StatusCode::SUCCESS;
+}
+
+/// Algorithm Approach
+StatusCode NewMergeMcEventCollTool::processAllSubEvents()
+{
+  ATH_MSG_VERBOSE ( this->name()<<"::processAllSubEvents()" );
+  SG::WriteHandle<McEventCollection> outputMcEventCollection(m_truthCollOutputKey);
+  ATH_CHECK(outputMcEventCollection.record(std::make_unique<McEventCollection>()));
+
+  //first get the list of McEventCollections
+  typedef PileUpMergeSvc::TimedList<McEventCollection>::type TimedTruthList;
+  TimedTruthList truthList;
+  ATH_CHECK(m_pMergeSvc->retrieveSubEvtsData(m_truthCollInputKey.value(), truthList));
+
+  //Check we are getting at least one event
+  const unsigned int nInputMcEventColls=truthList.size();
+  if (0 == nInputMcEventColls)
+    {
+      ATH_MSG_WARNING("TimedTruthList with key " << m_truthCollInputKey.value() << " is empty.");
+      return StatusCode::SUCCESS;
+    }
+
+  ATH_MSG_DEBUG( "execute: there are " << nInputMcEventColls << " subevents in this event.");
+  //TODO can we make this into an auto for loop?
+  TimedTruthList::iterator timedTruthListIter(truthList.begin()), endOfTimedTruthList(truthList.end());
+  //loop over the McEventCollections (each one assumed to containing exactly one GenEvent) of the various input events
+  while (timedTruthListIter != endOfTimedTruthList)
+    {
+      ATH_MSG_VERBOSE( this->name()<<"::processBunchXing: SubEvt McEventCollection of PileUpType " << timedTruthListIter->first.type() );
+      if(m_pileUpType==timedTruthListIter->first.type()) {
+        const McEventCollection *pBackgroundMcEvtColl(&*(timedTruthListIter->second));
+        ATH_CHECK(this->processEvent(pBackgroundMcEvtColl,outputMcEventCollection.ptr(),timedTruthListIter->first.time()));
+      }
+      ++timedTruthListIter;
+    } //timed colls
+
+  if(msgLvl(MSG::VERBOSE)) { this->printDetailsOfMergedMcEventCollection(outputMcEventCollection.ptr()); }
+  return StatusCode::SUCCESS;
+}
+
+StatusCode NewMergeMcEventCollTool::processEvent(const McEventCollection *pMcEvtColl, McEventCollection *outputMcEventCollection, PileUpTimeEventIndex::time_type timeOffset)
+{
+  ATH_MSG_VERBOSE(  this->name()<<"::processEvent()" );
+  if (!outputMcEventCollection) {
+    ATH_MSG_ERROR( this->name()<<"::processEvent() was passed an null output McEventCollection pointer." );
+    return StatusCode::FAILURE;
+  }
+  if (!pMcEvtColl) {
+    ATH_MSG_ERROR( this->name()<<"::processEvent() was passed an null input McEventCollection pointer." );
+    return StatusCode::FAILURE;
+  }
+  if (!pMcEvtColl->empty()) {
+    for (unsigned int iEv=0; iEv<pMcEvtColl->size(); iEv++) {
+      const HepMC::GenEvent& c_evt(*((*pMcEvtColl)[iEv]));
+      HepMC::GenEvent * evt = new HepMC::GenEvent(c_evt);
+      for (HepMC::GenEvent::vertex_iterator itVer=evt->vertices_begin(); itVer!=evt->vertices_end(); ++itVer) {
+        HepMC::FourVector newPos((*itVer)->position().x(),(*itVer)->position().y(),(*itVer)->position().z(),(*itVer)->position().t()+timeOffset);
+        (*itVer)->set_position(newPos);
+      }
+      outputMcEventCollection->push_back(evt);
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+
+void NewMergeMcEventCollTool::printDetailsOfMergedMcEventCollection(McEventCollection* outputMcEventCollection) const
+{
+  DataVector<HepMC::GenEvent>::const_iterator outputEventItr(outputMcEventCollection->begin());
+  const DataVector<HepMC::GenEvent>::const_iterator endOfEvents(outputMcEventCollection->end());
+  ATH_MSG_INFO ( "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
+  ATH_MSG_INFO ( "pileUpType: " << m_pileUpType);
+  ATH_MSG_INFO ( "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
+  ATH_MSG_INFO ( "Current OUTPUT GenEvent: " );
+  while(outputEventItr!=endOfEvents)
+    {
+      const int signal_process_id((*outputEventItr)->signal_process_id());
+      const int event_number((*outputEventItr)->event_number());
+      ATH_MSG_INFO ( "GenEvent #"<<event_number<<", signal_process_id="<<signal_process_id<</*", category="<<event->second<<*/", number of Vertices="<<(*outputEventItr)->vertices_size() );
+      char fname[80];
+      sprintf(fname,"%s.event%d.txt",m_truthCollInputKey.value().c_str(),event_number);
+      std::ofstream of(fname);
+      (*outputEventItr)->print(of); // verbose output
+      of.close();
+      //      HepMC::GenEvent& currentSignalEvent(**(outputEventItr));
+      //      currentSignalEvent.print();
+      //      ATH_MSG_INFO ( "Current signal_process_vertex: " );
+      //      if(0!=currentSignalEvent.signal_process_vertex()) currentSignalEvent.signal_process_vertex()->print();
+      //      else ATH_MSG_INFO ( "signal_process_vertex is NULL" );
+      ++outputEventItr;
+    }
+  ATH_MSG_INFO ( "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
+  return;
+}
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.h b/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..e79bea3abe1c360271884bdf7750d805e066b079
--- /dev/null
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/NewMergeMcEventCollTool.h
@@ -0,0 +1,61 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef MCTRUTHSIMALGS_NEWMERGEMCEVENTCOLLTOOL_H
+#define MCTRUTHSIMALGS_NEWMERGEMCEVENTCOLLTOOL_H
+
+#include "GaudiKernel/Property.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "StoreGate/WriteHandle.h"
+#include "StoreGate/WriteHandleKey.h"
+
+#include "GeneratorObjects/McEventCollection.h"
+
+#include "PileUpTools/PileUpMergeSvc.h"
+
+#include "PileUpTools/PileUpToolBase.h"
+
+/** @class NewMergeMcEventCollTool
+ *  @brief a PileUpTool to merge MC truth collection in the overlay store
+ *
+ */
+class NewMergeMcEventCollTool : public PileUpToolBase {
+public:
+  NewMergeMcEventCollTool(const std::string& type,
+                 const std::string& name,
+                 const IInterface* parent);
+  virtual StatusCode initialize() override final;
+  ///called before the subevts loop. Not (necessarily) able to access
+  ///SubEvents
+  virtual StatusCode prepareEvent(unsigned int nInputEvents) override final;
+  ///called at the end of the subevts loop. Not (necessarily) able to access
+  ///SubEvents
+  virtual StatusCode mergeEvent() override final;
+  ///called for each active bunch-crossing to process current SubEvents
+  /// bunchXing is in ns
+  virtual StatusCode
+    processBunchXing(int /*bunchXing*/,
+                     SubEventIterator bSubEvents,
+                     SubEventIterator eSubEvents) override final;
+
+  virtual StatusCode processAllSubEvents() override final;
+
+private:
+  //** Add the required information from the current GenEvent to the output McEventCollection
+  StatusCode processEvent(const McEventCollection *pMcEvtColl, McEventCollection *outputMcEventCollection, PileUpTimeEventIndex::time_type timeOffset=0);
+  //** Print out detailed debug info if required.
+  void printDetailsOfMergedMcEventCollection(McEventCollection *outputMcEventCollection) const;
+  //** Handle for the PileUpMergeSvc (provides input McEventCollections)
+  ServiceHandle<PileUpMergeSvc> m_pMergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc", ""};
+  //** Name of input McEventCollection
+  StringProperty m_truthCollInputKey{"TruthEvent"};
+  //** Depends on PileUpTimeEventIndex::PileUpType; provide one instance of this tool for each type
+  int m_pileUpType{-1}; // initialise to PileUpTimeEventIndex::PileUpType::Unknown
+  //** Writing to StoreGate safely in MT
+  SG::WriteHandle<McEventCollection> m_outputMcEventCollection{};
+  //** Writing to StoreGate safely in MT
+  SG::WriteHandleKey<McEventCollection> m_truthCollOutputKey{this, "TruthCollOutputKey","TruthEvent",""};
+};
+#endif //MCTRUTHSIMALGS_NEWMERGEMCEVENTCOLLTOOL_H
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..37e3a3edc75e596540228d35ba652bb6e2a8882d
--- /dev/null
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.cxx
@@ -0,0 +1,182 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SimpleMergeMcEventCollTool.h"
+#include "GeneratorObjects/McEventCollection.h"
+#include "PileUpTools/PileUpMergeSvc.h"
+#include "StoreGate/StoreGateSvc.h"
+#include <fstream>
+
+SimpleMergeMcEventCollTool::SimpleMergeMcEventCollTool(const std::string& type,
+                                                       const std::string& name,
+                                                       const IInterface *parent) :
+  PileUpToolBase(type, name, parent)
+{
+  declareProperty("TruthCollInputKey",   m_truthCollInputKey);
+}
+
+StatusCode SimpleMergeMcEventCollTool::initialize()
+{
+  if(!m_pMergeSvc.empty())
+    {
+       ATH_CHECK(m_pMergeSvc.retrieve());
+    }
+  return StatusCode::SUCCESS;
+}
+
+/// PileUpTools Approach
+StatusCode SimpleMergeMcEventCollTool::prepareEvent(unsigned int nInputEvents)
+{
+  ATH_MSG_VERBOSE ( "prepareEvent()" );
+  m_nBkgEventsReadSoFar=0;
+
+  //Check we are getting at least one event
+  m_nInputMcEventColls = nInputEvents;
+  if (0 == m_nInputMcEventColls)
+     {
+      ATH_MSG_ERROR("prepareEvent: TimedTruthList with key "
+                    << m_truthCollInputKey.value() << " is empty");
+      return StatusCode::RECOVERABLE;
+    }
+  ATH_MSG_DEBUG( "prepareEvent: there are " << m_nInputMcEventColls << " subevents in this event.");
+
+  if (!m_outputMcEventCollection.isValid()) {
+    // Would be nice to avoid having the WriteHandle as a member
+    // variable, but this is the only way to allow multiple function
+    // calls to add information to the version of the
+    // McEventCollection in the output StoreGate
+    m_outputMcEventCollection = SG::makeHandle(m_truthCollOutputKey);
+    ATH_CHECK(m_outputMcEventCollection.record(std::make_unique<McEventCollection>()));
+  }
+  else {
+    ATH_MSG_ERROR("WriteHandle already valid??");
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode SimpleMergeMcEventCollTool::processBunchXing(int /*bunchXing*/,
+                                                        SubEventIterator bSubEvents,
+                                                        SubEventIterator eSubEvents)
+{
+  SubEventIterator iEvt(bSubEvents);
+  //loop over the McEventCollections (each one assumed to containing exactly one GenEvent) of the various input events
+  while (iEvt != eSubEvents)
+    {
+      StoreGateSvc& seStore(*iEvt->ptr()->evtStore());
+      const McEventCollection *pMEC(nullptr);
+      ATH_CHECK(seStore.retrieve(pMEC, m_truthCollInputKey.value()));
+      ATH_MSG_DEBUG ("processBunchXing: SubEvt McEventCollection from StoreGate " << seStore.name() );
+      ATH_CHECK(this->processEvent(pMEC, m_outputMcEventCollection.ptr()));
+      ++iEvt;
+    }
+  return StatusCode::SUCCESS;
+}
+
+StatusCode SimpleMergeMcEventCollTool::mergeEvent()
+{
+  ATH_MSG_DEBUG( "mergeEvent()" );
+  if(m_nBkgEventsReadSoFar+1<m_nInputMcEventColls)
+    {
+      ATH_MSG_WARNING( "mergeEvent: Expected " << m_nInputMcEventColls << " subevents, but only saw " << m_nBkgEventsReadSoFar+1 << "! The job will probably crash now..." );
+      return StatusCode::FAILURE;
+    }
+  if(msgLvl(MSG::VERBOSE)) { this->printDetailsOfMergedMcEventCollection(m_outputMcEventCollection.ptr()); }
+  return StatusCode::SUCCESS;
+}
+
+/// Algorithm Approach
+StatusCode SimpleMergeMcEventCollTool::processAllSubEvents()
+{
+  ATH_MSG_VERBOSE ( "processAllSubEvents()" );
+  SG::WriteHandle<McEventCollection> outputMcEventCollection(m_truthCollOutputKey);
+  ATH_CHECK(outputMcEventCollection.record(std::make_unique<McEventCollection>()));
+
+  //first get the list of McEventCollections
+  typedef PileUpMergeSvc::TimedList<McEventCollection>::type TimedTruthList;
+  TimedTruthList truthList;
+  ATH_CHECK(m_pMergeSvc->retrieveSubEvtsData(m_truthCollInputKey.value(), truthList));
+
+  m_nBkgEventsReadSoFar=0;
+
+  //Check we are getting at least one event
+  m_nInputMcEventColls=truthList.size();
+  if (0 == m_nInputMcEventColls)
+    {
+      ATH_MSG_ERROR("TimedTruthList with key " << m_truthCollInputKey.value() << " is empty.");
+      return StatusCode::RECOVERABLE;
+    }
+
+  ATH_MSG_DEBUG( "execute: there are " << m_nInputMcEventColls << " subevents in this event.");
+  //TODO can we make this into an auto for loop?
+  TimedTruthList::iterator timedTruthListIter(truthList.begin()), endOfTimedTruthList(truthList.end());
+  //loop over the McEventCollections (each one assumed to containing exactly one GenEvent) of the various input events
+  while (timedTruthListIter != endOfTimedTruthList)
+    {
+      const McEventCollection *pBackgroundMcEvtColl(&*(timedTruthListIter->second));
+      ATH_CHECK(this->processEvent(pBackgroundMcEvtColl,outputMcEventCollection.ptr()));
+      ++timedTruthListIter;
+    } //timed colls
+
+  if(msgLvl(MSG::VERBOSE)) { this->printDetailsOfMergedMcEventCollection(outputMcEventCollection.ptr()); }
+  return StatusCode::SUCCESS;
+}
+
+/// Common methods
+
+StatusCode SimpleMergeMcEventCollTool::processEvent(const McEventCollection *pMcEvtColl, McEventCollection *outputMcEventCollection)
+{
+  ATH_MSG_VERBOSE ( "processEvent()" );
+  if (!outputMcEventCollection) {
+    ATH_MSG_ERROR( this->name()<<"::processEvent() was passed an null output McEventCollection pointer." );
+    return StatusCode::FAILURE;
+  }
+  if (!pMcEvtColl) {
+    ATH_MSG_ERROR( this->name()<<"::processEvent() was passed an null input McEventCollection pointer." );
+    return StatusCode::FAILURE;
+  }
+
+  if (pMcEvtColl->empty())
+    {
+      ++m_nBkgEventsReadSoFar;
+      return StatusCode::SUCCESS;
+    }
+  //GenEvt is there
+
+  const HepMC::GenEvent& currentBackgroundEvent(**(pMcEvtColl->begin()));
+  // FIXME no protection against multiple GenEvents having the same event number
+  outputMcEventCollection->push_back(new HepMC::GenEvent(currentBackgroundEvent));
+  ++m_nBkgEventsReadSoFar;
+  return StatusCode::SUCCESS;
+}
+
+void SimpleMergeMcEventCollTool::printDetailsOfMergedMcEventCollection(McEventCollection *outputMcEventCollection) const
+{
+  if (outputMcEventCollection->empty()) { return; }
+  DataVector<HepMC::GenEvent>::const_iterator outputEventItr(outputMcEventCollection->begin());
+  const DataVector<HepMC::GenEvent>::const_iterator endOfEvents(outputMcEventCollection->end());
+  ATH_MSG_INFO ( "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
+  ATH_MSG_INFO ( "Current OUTPUT GenEvent: " );
+  while(outputEventItr!=endOfEvents)
+    {
+      const int signal_process_id((*outputEventItr)->signal_process_id());
+      const int event_number((*outputEventItr)->event_number());
+      ATH_MSG_INFO ( "GenEvent #"<<event_number<<", signal_process_id="<<signal_process_id<</*", category="<<event->second<<*/", number of Vertices="<<(*outputEventItr)->vertices_size() );
+      char fname[80];
+      sprintf(fname,"%s.event%d.txt",m_truthCollInputKey.value().c_str(),event_number);
+      std::ofstream of(fname);
+      (*outputEventItr)->print(of); // verbose output
+      of.close();
+      //      HepMC::GenEvent& currentSignalEvent(**(outputEventItr));
+      //      currentSignalEvent.print();
+      //      ATH_MSG_INFO ( "Current signal_process_vertex: " );
+      //      if(0!=currentSignalEvent.signal_process_vertex()) currentSignalEvent.signal_process_vertex()->print();
+      //      else ATH_MSG_INFO ( "signal_process_vertex is NULL" );
+      ++outputEventItr;
+    }
+  ATH_MSG_INFO ( "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
+  return;
+}
+
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.h b/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..aed3d18c1d3619b27dc615d95ed250b832c1555d
--- /dev/null
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/SimpleMergeMcEventCollTool.h
@@ -0,0 +1,74 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef MCTRUTHSIMALGS_SIMPLEMERGEMCEVENTCOLLTOOL_H
+#define MCTRUTHSIMALGS_SIMPLEMERGEMCEVENTCOLLTOOL_H
+
+#include "PileUpTools/PileUpToolBase.h"
+
+#include "GaudiKernel/Property.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include <utility> /* pair */
+
+class McEventCollection;
+class StoreGateSvc;
+class PileUpMergeSvc;
+
+namespace HepMC {
+  class GenParticle;
+  class GenVertex;
+}
+/** @class SimpleMergeMcEventCollTool
+ *  @brief a PileUpTool to merge MC truth collection in the overlay store
+ *
+ *  $Id:
+ *  @author jchapman@cern.ch
+ *
+ */
+class SimpleMergeMcEventCollTool : public PileUpToolBase {
+public:
+  SimpleMergeMcEventCollTool(const std::string& type,
+                 const std::string& name,
+                 const IInterface* parent);
+  virtual StatusCode initialize() override final;
+  ///called before the subevts loop. Not (necessarily) able to access
+  ///SubEvents
+  virtual StatusCode prepareEvent(unsigned int nInputEvents) override final;
+  ///called at the end of the subevts loop. Not (necessarily) able to access
+  ///SubEvents
+  virtual StatusCode mergeEvent() override final;
+  ///called for each active bunch-crossing to process current SubEvents
+  /// bunchXing is in ns
+  virtual StatusCode
+    processBunchXing(int /*bunchXing*/,
+                     SubEventIterator bSubEvents,
+                     SubEventIterator eSubEvents) override final;
+  /// return false if not interested in  certain xing times (in ns)
+  /// implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
+  //  virtual bool toProcess(int bunchXing) const;
+
+  virtual StatusCode processAllSubEvents() override final;
+
+private:
+  //** Add the required information from the current GenEvent to the output McEventCollection
+  StatusCode processEvent(const McEventCollection *pMcEvtColl, McEventCollection *outputMcEventCollection);
+  //** Special case of processEvent for the first (signal) GenEvent
+  StatusCode processFirstSubEvent(const McEventCollection *pMcEvtColl, McEventCollection *outputMcEventCollection);
+  //** Print out detailed debug info if required.
+  void printDetailsOfMergedMcEventCollection(McEventCollection *outputMcEventCollection) const;
+  //** Handle for the PileUpMergeSvc (provides input McEventCollections)
+  ServiceHandle<PileUpMergeSvc> m_pMergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc", ""};
+  //** Writing to StoreGate safely in MT
+  SG::WriteHandle<McEventCollection> m_outputMcEventCollection{};
+  //** Writing to StoreGate safely in MT
+  SG::WriteHandleKey<McEventCollection> m_truthCollOutputKey{this, "TruthCollOutputKey","TruthEvent",""};
+  //** Name of input McEventCollection
+  StringProperty m_truthCollInputKey{"TruthEvent"};
+  //** The total number of GenEvents that will be passed for the current signal event
+  unsigned int m_nInputMcEventColls{0};
+  //** How many background events have been read so far for this signal event
+  unsigned int m_nBkgEventsReadSoFar{0};
+};
+#endif //MCTRUTHSIMALGS_SIMPLEMERGEMCEVENTCOLLTOOL_H
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/components/MCTruthSimAlgs_entries.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/components/MCTruthSimAlgs_entries.cxx
index 6e9a08f92fbd173c0486e626169a007c0ce707b0..e21397782941370a003583b11d241547b115bf2c 100644
--- a/Simulation/G4Utilities/MCTruthSimAlgs/src/components/MCTruthSimAlgs_entries.cxx
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/components/MCTruthSimAlgs_entries.cxx
@@ -1,5 +1,7 @@
 #include "../MergeMcEventCollection.h"
 #include "../MergeMcEventCollTool.h"
+#include "../NewMergeMcEventCollTool.h"
+#include "../SimpleMergeMcEventCollTool.h"
 #include "../MergeTrackRecordCollection.h"
 #include "../MergeTrackRecordCollTool.h"
 #include "../MergeCalibHits.h"
@@ -22,10 +24,11 @@ DECLARE_COMPONENT( MergeTruthJets )
 DECLARE_COMPONENT( MergeRecoTimingObj )
 DECLARE_COMPONENT( MergeGenericMuonSimHitColl )
 DECLARE_COMPONENT( MergeMcEventCollTool )
+DECLARE_COMPONENT( NewMergeMcEventCollTool )
+DECLARE_COMPONENT( SimpleMergeMcEventCollTool )
 DECLARE_COMPONENT( MergeTrackRecordCollTool )
 DECLARE_COMPONENT( MergeCalibHitsTool )
 DECLARE_COMPONENT( MergeHijingParsTool )
 DECLARE_COMPONENT( MergeTruthJetsTool )
 DECLARE_COMPONENT( MergeRecoTimingObjTool )
 DECLARE_COMPONENT( MergeGenericMuonSimHitCollTool )
-
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 dbbc0dca66e1af258729f967b1169132fc343486..c7779981e4d6196afe23253ee0f36958cac94d4a 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
@@ -21,25 +21,29 @@ def getCollectionMerger(name="ISF_CollectionMerger", **kwargs):
     kwargs.setdefault( "InputMDTHits",              [ ] )
     kwargs.setdefault( "InputRPCHits",              [ ] )
     kwargs.setdefault( "InputTGCHits",              [ ] )
-
-    kwargs.setdefault( "OutputBCMHits",             "BCMHits"             )
-    kwargs.setdefault( "OutputBLMHits",             "BLMHits"             )
-    kwargs.setdefault( "OutputPixelHits",           "PixelHits"           )
-    kwargs.setdefault( "OutputSCTHits",             "SCT_Hits"            )
-    kwargs.setdefault( "OutputTRTUncompressedHits", "TRTUncompressedHits" )
-
-    kwargs.setdefault( "OutputLArEMBHits",          "LArHitEMB"           )
-    kwargs.setdefault( "OutputLArEMECHits",         "LArHitEMEC"          )
-    kwargs.setdefault( "OutputLArFCALHits",         "LArHitFCAL"          )
-    kwargs.setdefault( "OutputLArHECHits",          "LArHitHEC"           )
-
-    kwargs.setdefault( "OutputTileHits",            "TileHitVec"          )
-    kwargs.setdefault( "OutputMBTSHits",            "MBTSHits"            )
-
-    kwargs.setdefault( "OutputCSCHits",             "CSC_Hits"            )
-    kwargs.setdefault( "OutputMDTHits",             "MDT_Hits"            )
-    kwargs.setdefault( "OutputRPCHits",             "RPC_Hits"            )
-    kwargs.setdefault( "OutputTGCHits",             "TGC_Hits"            )
+    from AthenaCommon.DetFlags import DetFlags
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    hardscatterSG = ""
+    if athenaCommonFlags.DoFullChain() and DetFlags.pileup.any_on():
+        hardscatterSG = "OriginalEvent_SG+"
+    kwargs.setdefault( "OutputBCMHits",             hardscatterSG+"BCMHits"             )
+    kwargs.setdefault( "OutputBLMHits",             hardscatterSG+"BLMHits"             )
+    kwargs.setdefault( "OutputPixelHits",           hardscatterSG+"PixelHits"           )
+    kwargs.setdefault( "OutputSCTHits",             hardscatterSG+"SCT_Hits"            )
+    kwargs.setdefault( "OutputTRTUncompressedHits", hardscatterSG+"TRTUncompressedHits" )
+
+    kwargs.setdefault( "OutputLArEMBHits",          hardscatterSG+"LArHitEMB"           )
+    kwargs.setdefault( "OutputLArEMECHits",         hardscatterSG+"LArHitEMEC"          )
+    kwargs.setdefault( "OutputLArFCALHits",         hardscatterSG+"LArHitFCAL"          )
+    kwargs.setdefault( "OutputLArHECHits",          hardscatterSG+"LArHitHEC"           )
+
+    kwargs.setdefault( "OutputTileHits",            hardscatterSG+"TileHitVec"          )
+    kwargs.setdefault( "OutputMBTSHits",            hardscatterSG+"MBTSHits"            )
+
+    kwargs.setdefault( "OutputCSCHits",             hardscatterSG+"CSC_Hits"            )
+    kwargs.setdefault( "OutputMDTHits",             hardscatterSG+"MDT_Hits"            )
+    kwargs.setdefault( "OutputRPCHits",             hardscatterSG+"RPC_Hits"            )
+    kwargs.setdefault( "OutputTGCHits",             hardscatterSG+"TGC_Hits"            )
     return CfgMgr.ISF__CollectionMerger(name, **kwargs)
 
 def getSimHitTreeCreator(name="ISF_SimHitTreeCreator", **kwargs):
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
index c90af2b8cdc12bf4d88987894dcb061bdf3e44ad..7335385ccf145dc2a9579644c607a35cc0e2a929 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py
@@ -1,7 +1,8 @@
 from AthenaCommon.CfgGetter import getAlgorithm
 from G4AtlasApps.SimFlags import simFlags
 from ISF_Config.ISF_jobProperties import ISF_Flags
-
+from AthenaCommon.DetFlags import DetFlags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 
 def generate_mergeable_collection_name(bare_collection_name,
                                        mergeable_collection_suffix,
@@ -17,6 +18,7 @@ def generate_mergeable_collection_name(bare_collection_name,
     :param merger_input_property: name of the Input* property in the
         CollectionMerger algorithm to add the mergeable collection to.
     """
+    hardscatterSG = "OriginalEvent_SG+"
     if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired():
         mergeable_collection = '{bare}{suffix}'.format(
             bare=bare_collection_name,
@@ -29,6 +31,8 @@ def generate_mergeable_collection_name(bare_collection_name,
         merger_input_collections = getattr(collection_merger,
                                            input_attribute_name)
         merger_input_collections.append(mergeable_collection)
+    elif athenaCommonFlags.DoFullChain() and DetFlags.pileup.any_on():
+        mergeable_collection = hardscatterSG+bare_collection_name
     else:
         mergeable_collection = bare_collection_name
 
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 dfcbc352f394dd9305d156fd91229fb28c497dc5..c5628992a94012ee0dec7dc64badf29d2ff4df3b 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py
@@ -1,13 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 """
 Tools configurations for ISF
 KG Tan, 17/06/2012
 """
 
-from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
-        getService,getServiceClone,getAlgorithm,getAlgorithmClone
-
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.DetFlags import DetFlags
@@ -19,7 +16,10 @@ def getEntryLayerTool(name="ISF_EntryLayerTool", **kwargs):
     kwargs.setdefault('GeoIDSvc'        , 'ISF_GeoIDSvc')
     from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault('ParticleFilters' , [ simFlags.TruthStrategy.EntryLayerFilterName() ] )
-
+    from AthenaCommon.DetFlags import DetFlags
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if athenaCommonFlags.DoFullChain() and DetFlags.pileup.any_on():
+        kwargs.setdefault('EvtStore', 'OriginalEvent_SG') # For Fast Chain
     from ISF_Geant4CommonTools.ISF_Geant4CommonToolsConf import ISF__EntryLayerTool
     return ISF__EntryLayerTool(name, **kwargs)
 
diff --git a/Tools/FullChainTransforms/CMakeLists.txt b/Tools/FullChainTransforms/CMakeLists.txt
index 162b7d68a638d8e55fcd0389f0fe75d87020dac5..0260efdfd6c8a9554da2f25a2c51aa8aa3c2ec72 100644
--- a/Tools/FullChainTransforms/CMakeLists.txt
+++ b/Tools/FullChainTransforms/CMakeLists.txt
@@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC
 find_package( PythonLibs )
 
 # Install files from the package:
+atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( scripts/*.py )
 
diff --git a/Tools/FullChainTransforms/python/FastChainConfigCheckers.py b/Tools/FullChainTransforms/python/FastChainConfigCheckers.py
new file mode 100644
index 0000000000000000000000000000000000000000..3461c2ed64a76e295f22c49c59f96470565e2171
--- /dev/null
+++ b/Tools/FullChainTransforms/python/FastChainConfigCheckers.py
@@ -0,0 +1,28 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+
+def syncDigitizationAndSimulationJobProperties():
+    from AthenaCommon.Logging import logging
+    logDigiConfigChecker = logging.getLogger( 'FastChainConfigChecker' )
+
+    from G4AtlasApps.SimFlags import simFlags
+    from Digitization.DigitizationFlags import digitizationFlags
+    logDigiConfigChecker.info("Digitization jobProperties values:")
+    digitizationFlags.print_JobProperties()
+
+    if digitizationFlags.TRTRangeCut.get_Value() != simFlags.TRTRangeCut.get_Value() :
+        logDigiConfigChecker.info("Setting digitizationFlags.TRTRangeCut equal to simFlags.TRTRangeCut.")
+        digitizationFlags.TRTRangeCut = simFlags.TRTRangeCut.get_Value()
+
+    import os
+    G4Version = str(os.environ['G4VERS'])
+    if digitizationFlags.SimG4VersionUsed.get_Value() != G4Version :
+        logDigiConfigChecker.info("Setting digitizationFlags.SimG4VersionUsed equal to G4VERS from environment. ")
+        digitizationFlags.SimG4VersionUsed = G4Version
+
+    if digitizationFlags.physicsList.get_Value() != simFlags.PhysicsList.get_Value() :
+        logDigiConfigChecker.info("Setting digitizationFlags.physicsList equal to simFlags.PhysicsList.")
+        digitizationFlags.physicsList = simFlags.PhysicsList.get_Value()
+
+    return
+
diff --git a/Tools/FullChainTransforms/python/FastChainWriteMetadata.py b/Tools/FullChainTransforms/python/FastChainWriteMetadata.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e71a8d21a467e3f2314646ad65ada2c5bc55aed
--- /dev/null
+++ b/Tools/FullChainTransforms/python/FastChainWriteMetadata.py
@@ -0,0 +1,238 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Logging import logging
+logFastChainWriteMetadata = logging.getLogger( 'FastChainWriteMetadata' )
+#-------------------------------------------------
+# Setup MetaData Stream
+#-------------------------------------------------
+#if not hasattr(ServiceMgr, 'MetaDataStore'):
+### In future should probably do a check here
+
+#from AthenaServices.AthenaServicesConf import AthenaOutputStream
+#StreamRDO_FH =  AthenaOutputStream( "StreamRDO_FH" )
+#StreamRDO_FH.ItemList += [ "IOVMetaDataContainer#*" ]
+
+
+myRunNumber = 0
+myEndRunNumber = 2147483647 # the max run number (32 bit integer)
+
+def ModifyingEventIdBySvc():
+    from Digitization.DigitizationFlags import digitizationFlags
+    if digitizationFlags.RunAndLumiOverrideList.statusOn or digitizationFlags.dataRunNumber.statusOn:
+        from AthenaCommon.AppMgr import ServiceMgr
+        if hasattr(ServiceMgr, 'EvtIdModifierSvc'):
+            if hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'):
+                return True
+            else:
+                logFastChainWriteMetadata.error('Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool. \
+                It will not be possible to set the min and max run number of the job.')
+                raise SystemExit("Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool.")
+        else:
+            raise SystemExit("jobProperties.Digitization.RunAndLumiOverrideList is set, but no EvtIdModifierSvc found!")
+    else :
+        logFastChainWriteMetadata.debug('digitizationFlags.RunAndLumiOverrideList not set, \
+        so not overriding min/max run numbers.')
+    return False
+
+def getRunNumberRangeForOutputMetadata():
+    myRunNumber = 0
+    myEndRunNumber = 2147483647 # the max run number
+    from Digitization.DigitizationFlags import digitizationFlags
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if not digitizationFlags.simRunNumber.statusOn and not athenaCommonFlags.DoFullChain:
+        #---------------------------------------------------
+        # Always Check for RunNumber in the first Input file
+        #---------------------------------------------------
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        myRunNumber = digitizationFlags.getHitFileRunNumber(athenaCommonFlags.PoolHitsInput.get_Value()[0])
+
+    if ModifyingEventIdBySvc():
+        logFastChainWriteMetadata.info('Setting the  Digitization MetaData IOV from the IOVDbMetaDataTool')
+        from AthenaCommon.AppMgr import ServiceMgr
+        myRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[0]
+        myEndRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[1]
+    else :
+        if myRunNumber > 0 :
+            logFastChainWriteMetadata.info('Found Run Number %s in hits file metadata.', str(myRunNumber) )
+            myEndRunNumber = myRunNumber+1 # got a reasonable run number so set end run to be the next run after this one.
+        else :
+            logFastChainWriteMetadata.info('Found unexpected Run Number %s in hits file metadata. Not overriding RunNumber to match hits file for this job.', str(myRunNumber) )
+            myRunNumber = 0
+    return myRunNumber, myEndRunNumber
+
+def writeDigitizationMetadata():
+    from IOVDbMetaDataTools import ParameterDbFiller
+    dbFiller = ParameterDbFiller.ParameterDbFiller()
+    myRunNumber, myEndRunNumber = getRunNumberRangeForOutputMetadata()
+    logFastChainWriteMetadata.debug('ParameterDbFiller BeginRun = %s', str(myRunNumber) )
+    dbFiller.setBeginRun(myRunNumber)
+    logFastChainWriteMetadata.debug('ParameterDbFiller EndRun   = %s', str(myEndRunNumber) )
+    dbFiller.setEndRun(myEndRunNumber)
+    #-------------------------------------------------
+    # Adding jobproperties to the list of MetaData
+    #-------------------------------------------------
+    # Here list the digitization jobproperties we want to write out as MetaData.
+    digitMetaDataKeys = ["doInDetNoise", "doCaloNoise", "doMuonNoise", "bunchSpacing",
+                         "initialBunchCrossing", "finalBunchCrossing", "FixedT0BunchCrossing",
+                         "doLowPtMinimumBias", "doHighPtMinimumBias",
+                         "doCavern", "doBeamGas", "doBeamHalo",
+                         "rndmSvc", "physicsList", "overrideMetadata","pileupDSID","digiSteeringConf"]
+                         #"readSeedsFromFile", "rndmSeedInputFile",
+    from Digitization.DigitizationFlags import digitizationFlags
+    if (not ModifyingEventIdBySvc()):
+        # in run-dependent-conditions digitization jobs these values may vary between jobs with the same IOV
+        digitMetaDataKeys += ["numberOfCollisions", "numberOfLowPtMinBias", "numberOfHighPtMinBias",
+                              "numberOfCavern", "numberOfBeamGas", "numberOfBeamHalo",
+                              "rndmSeedOffset1", "rndmSeedOffset2", "rndmSeedList"]
+    digitPropertiesDict = digitizationFlags.__dict__
+    digitPropertiesDictKeys = digitPropertiesDict.keys()
+    logFastChainWriteMetadata.info('Filling Digitization MetaData')
+    from Digitization.DigitizationFlags import digitizationFlags
+    for o in [ o for o in digitMetaDataKeys if o in digitPropertiesDictKeys ]:
+        testProperty = digitPropertiesDict.get(o)
+        if testProperty.statusOn or 'bool' in testProperty.allowedTypes :
+            testValue = testProperty.get_Value()
+            if not isinstance(testValue, str):
+                testValue = str(testProperty.get_Value())
+            dbFiller.addDigitParam(o, testValue)
+            logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', o, testValue)
+        else :
+            logFastChainWriteMetadata.debug('DigitizationMetaData: Not using jobproperty "%s" as it is switched off.', o)
+    del digitMetaDataKeys
+
+    # Bunch Structure
+    testKey = "BeamIntensityPattern"
+    if digitizationFlags.BeamIntensityPattern.statusOn:
+        testValue = str(digitizationFlags.BeamIntensityPattern.get_Value())
+    else:
+        testValue = "None"
+    logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', testKey, testValue)
+    dbFiller.addDigitParam64(testKey, testValue)
+
+    # BeamFlags
+    testKey = "beamType"
+    from AthenaCommon.BeamFlags import jobproperties
+    testValue = jobproperties.Beam.beamType.get_Value()
+    logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', testKey, testValue)
+    dbFiller.addDigitParam(testKey, testValue)
+    # Use Beam.bunchSpacing to specify the most representative spacing (intra-train) between filled bunch-crossings.
+    testKey = "intraTrainBunchSpacing"
+    testValue = str(jobproperties.Beam.bunchSpacing.get_Value())
+    logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', testKey, testValue)
+    dbFiller.addDigitParam(testKey, testValue)
+
+    # IOVDbGlobalTag is a special case here:
+    testKey = "IOVDbGlobalTag"
+    testValue = "default"
+    if digitizationFlags.IOVDbGlobalTag.statusOn :
+        testValue = digitizationFlags.IOVDbGlobalTag.get_Value()
+        if testValue == "" :
+            testValue = "default"
+    logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', testKey, testValue)
+    dbFiller.addDigitParam(testKey, testValue)
+
+    ##these collections can get too large to write out in full, so instead we count the number of files.
+    colsMetaDataKeys = ["LowPtMinBiasInputCols", "HighPtMinBiasInputCols",
+                        "cavernInputCols", "beamGasInputCols", "beamHaloInputCols"]
+    for o in [ o for o in colsMetaDataKeys if o in digitPropertiesDictKeys ]:
+        testKey = 'N_' + o.replace('Cols','Files')
+        testValue = '0'
+        if digitPropertiesDict.get(o).statusOn :
+            testList = digitPropertiesDict.get(o).get_Value()
+            if isinstance(testList, list):
+                testValue = str(len(testList))
+            else :
+                logFastChainWriteMetadata.warning('DigitizationMetaData: Key %s did not return a list. Ignoring.', o)
+        logFastChainWriteMetadata.info('DigitizationMetaData: setting %s to be %s', testKey, testValue)
+        dbFiller.addDigitParam(testKey, testValue)
+    del colsMetaDataKeys
+
+    ##this is also too long to write out in full. Just set flag if run-dependent MC is on.
+    testKey = 'RunAndLumiAreOverriden'
+    testValue = 'False'
+    if digitPropertiesDict.get('RunAndLumiOverrideList').statusOn :
+        testValue = 'True'
+        logFastChainWriteMetadata.info('DigitizationMetaData: setting %s to be %s', testKey, testValue)
+    dbFiller.addDigitParam(testKey, testValue)
+
+    ##In case the value used for Digitization differs from that used for simulation.
+    globalMetaDataKeys = ["DetDescrVersion"]
+    from AthenaCommon.GlobalFlags import globalflags
+    globalPropertiesDict = globalflags.__dict__
+    for o in [ o for o in globalMetaDataKeys if o in globalPropertiesDict.keys() ]:
+        testProperty = globalPropertiesDict.get(o)
+        if testProperty.statusOn or 'bool' in testProperty.allowedTypes :
+            testValue = testProperty.get_Value()
+            if not isinstance(testValue, str):
+                testValue = str(testProperty.get_Value())
+            dbFiller.addDigitParam(o, testValue)
+            logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', o, testValue)
+        else :
+            logFastChainWriteMetadata.debug('DigitizationMetaData: Not using jobproperty "%s" as it is switched off.', o)
+    del globalMetaDataKeys
+
+    ##LVL1 Config Version
+    testKey = "lvl1TriggerMenu"
+    testValue = "NONE"
+    from AthenaCommon.DetFlags import DetFlags
+    if DetFlags.digitize.LVL1_on():
+        #Protection so that TriggerFlags are not accessed when they have not be configured
+        from TriggerJobOpts.TriggerFlags import TriggerFlags
+        testValue = TriggerFlags.triggerConfig.get_Value()
+    dbFiller.addDigitParam(testKey,testValue)
+    logFastChainWriteMetadata.info('DigitizationMetaData: setting "%s" to be %s', testKey, testValue)
+    del testKey
+    del testValue
+
+    ## Digitized detector flags: add each enabled detector to the DigitizedDetectors list
+    digiDets = []
+    for det in ['pixel','SCT','TRT','BCM','Lucid','ZDC','ALFA','AFP','FwdRegion','LAr','HGTD','Tile','MDT','CSC','TGC','RPC','Micromegas','sTGC','Truth','LVL1']:
+        attrname = det+"_on"
+        checkfn = getattr(DetFlags.digitize, attrname, None)
+        if checkfn is None:
+            logFastChainWriteMetadata.info("No attribute '%s' found on DetFlags.digitize" % attrname)
+            continue
+        if checkfn():
+            digiDets.append(det)
+    logFastChainWriteMetadata.info("Setting 'DigitizedDetectors' = %s" % repr(digiDets))
+    dbFiller.addDigitParam('DigitizedDetectors', repr(digiDets))
+
+    #-------------------------------------------------
+    # Make the MetaData Db
+    #-------------------------------------------------
+    dbFiller.genDigitDb()
+
+    folder = "/Digitization/Parameters"
+    dbConnection = "sqlite://;schema=DigitParams.db;dbname=DIGPARAM"
+    from AthenaCommon.AppMgr import ServiceMgr
+    ServiceMgr.IOVDbSvc.Folders += [ folder + "<dbConnection>" + dbConnection + "</dbConnection>" ]
+    ServiceMgr.IOVDbSvc.FoldersToMetaData += [ folder ]
+    ServiceMgr.IOVSvc.partialPreLoadData = True
+
+    #raise SystemExit("Testing")
+
+
+def createSimulationParametersMetadata():
+    from IOVDbMetaDataTools import ParameterDbFiller
+    dbFiller = ParameterDbFiller.ParameterDbFiller()
+    myRunNumber, myEndRunNumber = getRunNumberRangeForOutputMetadata()
+    logFastChainWriteMetadata.info("Using the following run number range for MetaData IOV: ("+str(myRunNumber)+","+str(myEndRunNumber)+").")
+    dbFiller.setBeginRun(myRunNumber)
+    dbFiller.setEndRun(myEndRunNumber)
+
+    from ISF_Example.ISF_Metadata import fillAtlasMetadata, fillISFMetadata
+    fillAtlasMetadata(dbFiller)
+    from G4AtlasApps.SimFlags import simFlags
+    if simFlags.ISFRun:
+        fillISFMetadata(dbFiller)
+
+    ## Write the db info
+    dbFiller.genSimDb()
+    folder = "/Simulation/Parameters"
+    dbConnection = "sqlite://;schema=SimParams.db;dbname=SIMPARAM"
+    import IOVDbSvc.IOVDb
+    from AthenaCommon.AppMgr import ServiceMgr
+    ServiceMgr.IOVDbSvc.Folders += [ folder + "<dbConnection>" + dbConnection + "</dbConnection>" ]
+    ServiceMgr.IOVDbSvc.FoldersToMetaData += [folder]
+    ServiceMgr.IOVSvc.partialPreLoadData = True
+
diff --git a/Tools/FullChainTransforms/python/__init__.py b/Tools/FullChainTransforms/python/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..10eda52d21555e116affa250b4cc4c7110c820f1
--- /dev/null
+++ b/Tools/FullChainTransforms/python/__init__.py
@@ -0,0 +1,2 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
diff --git a/Tools/FullChainTransforms/scripts/FastChain_tf.py b/Tools/FullChainTransforms/scripts/FastChain_tf.py
index ad95df40d354ed573fb8420d231ee9279139f215..dd907c3d8a7d3063e6b74698aea5c339b5da5681 100755
--- a/Tools/FullChainTransforms/scripts/FastChain_tf.py
+++ b/Tools/FullChainTransforms/scripts/FastChain_tf.py
@@ -1,8 +1,8 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
-#  FastChain_tf.py 
+#  FastChain_tf.py
 #  One step transform to run SIM+DIGI as one job, then reco
 #  to ESD/AOD output
 #  Richard Hawkings, adapted from FullChain_tf.py by Graeme Stewart
@@ -21,14 +21,14 @@ from PyJobTransforms.trfExe import athenaExecutor
 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments
 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
 from RecJobTransforms.recTransformUtils import addRecoSubsteps, addAllRecoArgs
-from SimuJobTransforms.simTrfArgs import addForwardDetTrfArgs, addForwardDetTrfArgs, addCommonSimTrfArgs, addBasicDigiArgs, addCommonSimDigTrfArgs, addTrackRecordArgs, addSim_tfArgs
+from SimuJobTransforms.simTrfArgs import addForwardDetTrfArgs, addCommonSimTrfArgs, addBasicDigiArgs, addCommonSimDigTrfArgs, addTrackRecordArgs, addSim_tfArgs, addPileUpTrfArgs
 
 from PyJobTransforms.trfArgClasses import argFactory,argList
 
 @stdTrfExceptionHandler
 @sigUsrStackTrace
 def main():
-    
+
     msg.info('This is %s' % sys.argv[0])
 
     trf = getTransform()
@@ -41,12 +41,12 @@ def main():
 
 def getTransform():
     executorSet = set()
-    
+
     addRecoSubsteps(executorSet)
 
     # Sim + Digi - factor these out into an importable function in time
     executorSet.add(athenaExecutor(name = 'EVNTtoRDO', skeletonFile = 'FullChainTransforms/FastChainSkeleton.EVGENtoRDO.py',
-                                   substep = 'simdigi', tryDropAndReload = False, perfMonFile = 'ntuple.pmon.gz', 
+                                   substep = 'simdigi', tryDropAndReload = False, perfMonFile = 'ntuple.pmon.gz',
                                    inData=['NULL','EVNT'],
                                    outData=['RDO','NULL'] ))
 
@@ -58,20 +58,20 @@ def getTransform():
     addAthenaArguments(trf.parser)
     addDetectorArguments(trf.parser)
     addTriggerArguments(trf.parser)
-    
+
     # Reconstruction arguments and outputs (use the factorised 'do it all' function)
     addAllRecoArgs(trf)
-    
+
     # Simulation and digitisation options
     addCommonSimTrfArgs(trf.parser)
     addCommonSimDigTrfArgs(trf.parser)
     addBasicDigiArgs(trf.parser)
     addSim_tfArgs(trf.parser)
     # addForwardDetTrfArgs(trf.parser)
-    addCommonSimDigTrfArgs(trf.parser)
+    addPileUpTrfArgs(trf.parser)
     addTrackRecordArgs(trf.parser)
     addFastChainTrfArgs(trf.parser)
-    
+
     return trf
 
 def addFastChainTrfArgs(parser):
diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
index c462bd0bc1054b7b8c65aad930d6471bb5391cdc..cc1272fa2a72ea078f9a15b17e0f708afc2a4277 100644
--- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
@@ -6,13 +6,21 @@
 # removed cosmics, beam gas/halo and pileup configuration
 # trigger will not be run
 
+from AthenaCommon.Logging import *
+#from AthenaCommon.Logging import logging
+fast_chain_log = logging.getLogger('FastChainSkeleton')
+digilog = fast_chain_log
+#logDigitization_flags = logging.getLogger( 'Digitization' )
+#digilog = logging.getLogger('Digi_trf')
+#logConfigDigitization = logging.getLogger( 'ConfigDigitization' )
 
+fast_chain_log.info( '****************** STARTING EVNTtoRDO *****************' )
 
+fast_chain_log.info( '**** Transformation run arguments' )
+fast_chain_log.info( str(runArgs) )
 
-
-
-
-
+from AthenaCommon import CfgGetter
+import AthenaCommon.SystemOfUnits as Units
 
 
 ### Start of Sim
@@ -25,8 +33,9 @@
 
 #####################CommonSkeletonJobOptions.py##########################
 
-
-
+from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties
+pmon_properties.PerfMonFlags.doMonitoring=True
+pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True
 
 ######################################################################
 #                                                                    #
@@ -37,61 +46,44 @@
 from AthenaCommon.GlobalFlags import globalflags
 from AthenaCommon.BeamFlags import jobproperties
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from G4AtlasApps.SimFlags import simFlags
+from ISF_Config.ISF_jobProperties import ISF_Flags
+from Digitization.DigitizationFlags import digitizationFlags
 #from AthenaCommon.BFieldFlags import jobproperties ##Not sure if this is appropriate for G4 sim
 
 ## Max/skip events
 if hasattr(runArgs,"skipEvents"):
     athenaCommonFlags.SkipEvents.set_Value_and_Lock( runArgs.skipEvents )
+
+
 if hasattr(runArgs,"maxEvents"):
     athenaCommonFlags.EvtMax.set_Value_and_Lock( runArgs.maxEvents )
 else:
     athenaCommonFlags.EvtMax=-1
 
+
 if hasattr(runArgs,"conditionsTag"):
     if runArgs.conditionsTag != 'NONE':
         globalflags.ConditionsTag.set_Value_and_Lock( runArgs.conditionsTag ) #make this one compulsory?
+        digitizationFlags.IOVDbGlobalTag = runArgs.conditionsTag
+
+
 if hasattr(runArgs,"beamType"):
     if runArgs.beamType != 'NONE':
         # Setting beamType='cosmics' keeps cavern in world volume for g4sim also with non-commissioning geometries
         jobproperties.Beam.beamType.set_Value_and_Lock( runArgs.beamType )
-## if hasattr(runArgs,"AMITag"): rec.AMITag=runArgs.AMITag
-## if hasattr(runArgs,"userExec"): rec.UserExecs=runArgs.userExec
-## if hasattr(runArgs,"RunNumber"): rec.RunNumber=runArgs.RunNumber
-## if hasattr(runArgs,"projectName"): rec.projectName=runArgs.projectName
-## if hasattr(runArgs,"trigStream"): rec.triggerStream=runArgs.trigStream
-## if hasattr(runArgs,"triggerConfig"):
-##     from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
-##     tf.triggerConfig=runArgs.triggerConfig
+
 
 # Avoid command line preInclude for event service
 if hasattr(runArgs, "eventService") and runArgs.eventService:
     include('AthenaMP/AthenaMP_EventService.py')
 
-## autoConfiguration keywords triggering pre-defined functions
-## if hasattr(runArgs,"autoConfiguration"):
-##     for key in runArgs.autoConfiguration:
-##         rec.AutoConfiguration.append(key)
-
-from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties
-pmon_properties.PerfMonFlags.doMonitoring=True
-pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True
-
-
-# Conditions sequence for Athena MT
-from AthenaCommon.AlgSequence import AthSequencer
-condSeq = AthSequencer("AthCondSeq")
-if not hasattr(condSeq, "BeamSpotCondAlg"):
-   from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg
-   condSeq += BeamSpotCondAlg( "BeamSpotCondAlg" )
-
 
 #####################Back to Skeleton.EVGENtoHIT.py######################
 if hasattr(runArgs, "jobNumber"):
     if runArgs.jobNumber < 1:
         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]
@@ -121,12 +113,8 @@ else:
 
 
 ##############################Back to MyCustomSkeleton########################
-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 *
-fast_chain_log = logging.getLogger('ISF')
 fast_chain_log.info('****************** STARTING ISF ******************')
 
 ### Force trigger to be off
@@ -135,21 +123,26 @@ rec.doTrigger.set_Value_and_Lock(False)
 
 
 ## Simulation flags need to be imported first
-from G4AtlasApps.SimFlags import simFlags
 simFlags.load_atlas_flags()
+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!")
 simFlags.ISFRun=True
-from ISF_Config.ISF_jobProperties import ISF_Flags
 
 ## Set simulation geometry tag
 if hasattr(runArgs, 'geometryVersion'):
     simFlags.SimLayout.set_Value_and_Lock(runArgs.geometryVersion)
-    globalflags.DetDescrVersion = simFlags.SimLayout.get_Value()
     fast_chain_log.debug('SimLayout set to %s' % simFlags.SimLayout)
+    if runArgs.geometryVersion.endswith("_VALIDATION"):
+        pos=runArgs.geometryVersion.find("_VALIDATION")
+        globalflags.DetDescrVersion.set_Value_and_Lock( runArgs.geometryVersion[:pos] )
+    else:
+        globalflags.DetDescrVersion.set_Value_and_Lock( runArgs.geometryVersion )
+    fast_chain_log.debug('DetDescrVersion set to %s' % globalflags.DetDescrVersion)
 else:
     raise RuntimeError("No geometryVersion provided.")
 
+
 ## AthenaCommon flags
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 # Jobs should stop if an include fails.
 if hasattr(runArgs, "IgnoreConfigError"):
     athenaCommonFlags.AllowIgnoreConfigError = runArgs.IgnoreConfigError
@@ -158,8 +151,6 @@ else:
 
 athenaCommonFlags.DoFullChain=True
 
-from AthenaCommon.BeamFlags import jobproperties
-
 ## Input Files
 def setInputEvgenFileJobProperties(InputEvgenFile):
     from AthenaCommon.GlobalFlags import globalflags
@@ -213,22 +204,21 @@ if hasattr(runArgs, "inputEVNT_TRFile"):
     if hasattr(runArgs,"trackRecordType") and runArgs.trackRecordType=="stopped":
         include('SimulationJobOptions/preInclude.ReadStoppedParticles.py')
 
+# get top sequence
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
 # Avoid command line preInclude for cavern background
 if jobproperties.Beam.beamType.get_Value() != 'cosmics':
     # If it was already there, then we have a stopped particle file
     if hasattr(runArgs, "inputEVNT_TRFile") and\
-        not hasattr(topSeq,'TrackRecordGenerator'):
+        not hasattr(topSequence,'TrackRecordGenerator'):
         include('SimulationJobOptions/preInclude.G4ReadCavern.py')
     # If there's a stopped particle file, don't do all the cavern stuff
     if hasattr(runArgs, "outputEVNT_TRFile") and\
         not (hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn and simFlags.StoppedParticleFile.get_Value()!=''):
         include('SimulationJobOptions/preInclude.G4WriteCavern.py')
 
-# Avoid command line preInclude for event service
-if hasattr(runArgs, "eventService") and runArgs.eventService:
-    include('AthenaMP/AthenaMP_EventService.py')
-
-from ISF_Config.ISF_jobProperties import ISF_Flags
 if jobproperties.Beam.beamType.get_Value() == 'cosmics':
     ISF_Flags.Simulator.set_Value_and_Lock('CosmicsG4')
 elif hasattr(runArgs, 'simulator'):
@@ -236,38 +226,60 @@ elif hasattr(runArgs, 'simulator'):
 else:
     ISF_Flags.Simulator.set_Value_and_Lock('MC12G4')
 
-# temporary fix to ensure TRT will record hits if using FATRAS
-# this should eventually be removed when it is configured properly in ISF
-if hasattr(runArgs, 'simulator') and runArgs.simulator.find('ATLFASTIIF')>=0:
-    from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
-    TrkDetFlags.TRT_BuildStrawLayers=True
-    fast_chain_log.info('Enabled TRT_BuildStrawLayers to get hits in ATLFASTIIF')
+from AthenaCommon.DetFlags import DetFlags
+
+#Trial block: Set off tasks at start
+## Switch off tasks
+#    DetFlags.pileup.all_setOff()
+#    DetFlags.simulateLVL1.all_setOff()
+#    DetFlags.digitize.all_setOff()
+#if not simFlags.IsEventOverlayInputSim():
+#DetFlags.overlay.all_setOff()
+
+#    DetFlags.readRDOPool.all_setOff()
+#    DetFlags.makeRIO.all_setOff()
+#    DetFlags.writeBS.all_setOff()
+#    DetFlags.readRDOBS.all_setOff()
+#    DetFlags.readRIOBS.all_setOff()
+#    DetFlags.readRIOPool.all_setOff()
+#    DetFlags.writeRIOPool.all_setOff()
+#    DetFlags.writeRDOPool.all_setOff()
+
+
+#set flags ON:
 
+#Tasks we want switched ON (write RDOPool) - want this for all detectors that we want ON:
+#DetFlags.writeRDOPool.all_setOn()
+
+#### this flag turns all the detectors ON that we want for simulation.
 try:
     from ISF_Config import FlagSetters
     FlagSetters.configureFlagsBase()
-## Check for any simulator-specific configuration
+    ## Check for any simulator-specific configuration
     configureFlags = getattr(FlagSetters, ISF_Flags.Simulator.configFlagsMethodName(), None)
     if configureFlags is not None:
         configureFlags()
     possibleSubDetectors=['pixel','SCT','TRT','BCM','Lucid','ZDC','ALFA','AFP','FwdRegion','LAr','HGTD','Tile','MDT','CSC','TGC','RPC','Micromegas','sTGC','Truth']
     for subdet in possibleSubDetectors:
-        simattr = "simulate."+subdet+"_on"
-        simcheck = getattr(DetFlags, simattr, None)
+        simattr = subdet+"_on"
+        simcheck = getattr(DetFlags.simulate, simattr, None)
         if simcheck is not None and simcheck():
             attrname = subdet+"_setOn"
             checkfn = getattr(DetFlags, attrname, None)
             if checkfn is not None:
                 checkfn()
+
 except:
     ## Select detectors
     if 'DetFlags' not in dir():
-        from AthenaCommon.DetFlags import DetFlags
+        # from AthenaCommon.DetFlags import DetFlags
         ## If you configure one det flag, you're responsible for configuring them all!
         DetFlags.all_setOn()
-    DetFlags.LVL1_setOff() # LVL1 is not part of G4 sim
-    DetFlags.Truth_setOn()
 
+
+#DetFlags.all_setOn()
+DetFlags.LVL1_setOff()
+DetFlags.Truth_setOn()
 DetFlags.Forward_setOff() # Forward dets are off by default
 DetFlags.Micromegas_setOff()
 DetFlags.sTGC_setOff()
@@ -276,7 +288,69 @@ checkHGTDOff = getattr(DetFlags, 'HGTD_setOff', None)
 if checkHGTDOff is not None:
     checkHGTDOff() #Default for now
 
-from AthenaCommon.DetFlags import DetFlags
+# from AthenaCommon.DetFlags import DetFlags
+
+# from AthenaCommon.DetFlags import DetFlags
+    ## Tidy up DBM DetFlags: temporary measure
+DetFlags.DBM_setOff()
+
+if hasattr(simFlags, 'SimulateNewSmallWheel'):
+    if simFlags.SimulateNewSmallWheel():
+        DetFlags.sTGC_setOn()
+        DetFlags.Micromegas_setOn()
+
+#if simFlags.ForwardDetectors.statusOn:
+#    if DetFlags.geometry.FwdRegion_on():
+#        from AthenaCommon.AppMgr import ToolSvc
+#        ToolSvc += CfgGetter.getPublicTool("ForwardRegionProperties")
+
+### Set digitize all except forward detectors
+DetFlags.digitize.all_setOn()
+DetFlags.digitize.LVL1_setOff()
+DetFlags.digitize.ZDC_setOff()
+DetFlags.digitize.Micromegas_setOff()
+DetFlags.digitize.sTGC_setOff()
+DetFlags.digitize.Forward_setOff()
+DetFlags.digitize.Lucid_setOff()
+DetFlags.digitize.AFP_setOff()
+DetFlags.digitize.ALFA_setOff()
+
+#set all detdescr on except fwd.
+#DetFlags.detdescr.all_setOn()
+#DetFlags.detdescr.LVL1_setOff()
+#DetFlags.detdescr.ZDC_setOff()
+#DetFlags.detdescr.Micromegas_setOff()
+#DetFlags.detdescr.sTGC_setOff()
+#DetFlags.detdescr.Forward_setOff()
+#DetFlags.detdescr.Lucid_setOff()
+#DetFlags.detdescr.AFP_setOff()
+#DetFlags.detdescr.ALFA_setOff()
+
+#--------------------------------------------------------------
+# Set Detector flags for this run
+#--------------------------------------------------------------
+if 'DetFlags' in dir():
+
+    DetFlags.Print()
+    #DetFlags.overlay.all_setOff()
+
+#DetFlags.simulate.all_setOff()
+DetFlags.makeRIO.all_setOff()
+DetFlags.writeBS.all_setOff()
+DetFlags.readRDOBS.all_setOff()
+DetFlags.readRIOBS.all_setOff()
+DetFlags.readRIOPool.all_setOff()
+DetFlags.writeRIOPool.all_setOff()
+
+
+# temporary fix to ensure TRT will record hits if using FATRAS
+# this should eventually be removed when it is configured properly in ISF
+if hasattr(runArgs, 'simulator') and runArgs.simulator.find('ATLFASTIIF')>=0:
+    from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
+    TrkDetFlags.TRT_BuildStrawLayers=True
+    fast_chain_log.info('Enabled TRT_BuildStrawLayers to get hits in ATLFASTIIF')
+
+
 DetFlags.Print()
 
 # removed configuration of forward detectors from standard simulation config
@@ -306,6 +380,7 @@ if hasattr(runArgs,"DataRunNumber"):
     if runArgs.DataRunNumber>0:
         fast_chain_log.info( 'Overriding run number to be: %s ', runArgs.DataRunNumber )
         simFlags.RunNumber=runArgs.DataRunNumber
+        digitizationFlags.dataRunNumber=runArgs.DataRunNumber
 elif hasattr(runArgs,'jobNumber'):
     if runArgs.jobNumber>=0:
         fast_chain_log.info( 'Using job number '+str(runArgs.jobNumber)+' to derive run number.' )
@@ -314,60 +389,246 @@ elif hasattr(runArgs,'jobNumber'):
 
 ## removed code block for handling cosmics track record
 
-# get top sequence
-from AthenaCommon.AlgSequence import AlgSequence
-topSeq = AlgSequence()
+#--------------------------------------------------------------
+# Override pile-up configuration on the command-line
+#--------------------------------------------------------------
 
-## Set Overall per-Algorithm time-limit on the AlgSequence
-topSeq.TimeOut = 43200 * Units.s
+PileUpConfigOverride=False
+import math
 
-try:
-    from RecAlgs.RecAlgsConf import TimingAlg
-    topSeq+=TimingAlg("SimTimerBegin", TimingObjOutputName = "EVNTtoHITS_timings")
-except:
-    fast_chain_log.warning('Could not add TimingAlg, no timing info will be written out.')
+## First check for depreacted command-line options
+if hasattr(runArgs,"numberOfLowPtMinBias"):
+    if not math.fabs(digitizationFlags.numberOfLowPtMinBias.get_Value()-runArgs.numberOfLowPtMinBias)<0.00000001: #FIXME comparing two floats
+        fast_chain_log.info( "Changing digitizationFlags.numberOfLowPtMinBias from %s to %s", digitizationFlags.numberOfLowPtMinBias.get_Value(),runArgs.numberOfLowPtMinBias)
+        digitizationFlags.numberOfLowPtMinBias=float(runArgs.numberOfLowPtMinBias)
+        PileUpConfigOverride=True
+if hasattr(runArgs,"numberOfHighPtMinBias"):
+    if not math.fabs(digitizationFlags.numberOfHighPtMinBias.get_Value()-runArgs.numberOfHighPtMinBias)<0.00000001: #FIXME comparing two floats
+        fast_chain_log.info( "Changing digitizationFlags.numberOfHighPtMinBias from %s to %s", digitizationFlags.numberOfHighPtMinBias.get_Value(),runArgs.numberOfHighPtMinBias)
+        digitizationFlags.numberOfHighPtMinBias=float(runArgs.numberOfHighPtMinBias)
+        PileUpConfigOverride=True
+if hasattr(runArgs,"numberOfBeamHalo"):
+    if not math.fabs(digitizationFlags.numberOfBeamHalo.get_Value()-runArgs.numberOfBeamHalo)<0.00000001: #FIXME comparing two floats
+        fast_chain_log.info( "Changing digitizationFlags.numberOfBeamHalo from %s to %s", digitizationFlags.numberOfBeamHalo.get_Value(),runArgs.numberOfBeamHalo)
+        digitizationFlags.numberOfBeamHalo=float(runArgs.numberOfBeamHalo)
+        PileUpConfigOverride=True
+if hasattr(runArgs,"numberOfBeamGas"):
+    if not math.fabs(digitizationFlags.numberOfBeamGas.get_Value()-runArgs.numberOfBeamGas)<0.00000001: #FIXME comparing two floats
+        fast_chain_log.info( "Changing digitizationFlags.numberOfBeamGas from %s to %s", digitizationFlags.numberOfBeamGas.get_Value(),runArgs.numberOfBeamGas)
+        digitizationFlags.numberOfBeamGas=float(runArgs.numberOfBeamGas)
+        PileUpConfigOverride=True
+if hasattr(runArgs,"numberOfCavernBkg"):
+    if not digitizationFlags.numberOfCavern.get_Value()==runArgs.numberOfCavernBkg:
+        fast_chain_log.info( "Changing digitizationFlags.cavernEvents from %s to %s", digitizationFlags.numberOfCavern.get_Value(),runArgs.numberOfCavernBkg)
+        digitizationFlags.numberOfCavern=runArgs.numberOfCavernBkg
+        PileUpConfigOverride=True
+if hasattr(runArgs,"bunchSpacing"):
+    if  digitizationFlags.BeamIntensityPattern.statusOn:
+        fast_chain_log.warning("Redefine bunch-structure with a fixed %s ns bunchSpacing. Overwriting the previous setting of %s", runArgs.bunchSpacing,digitizationFlags.BeamIntensityPattern.get_Value())
+    else:
+        fast_chain_log.info( "Setting up job to run with a fixed %s ns bunchSpacing.", runArgs.bunchSpacing)
+    digitizationFlags.bunchSpacing = 25
+    digitizationFlags.BeamIntensityPattern.createConstBunchSpacingPattern(int(runArgs.bunchSpacing)) #FIXME This runArg should probably inherit from argInt rather than argFloat
+    fast_chain_log.info( "New bunch-structure = %s", digitizationFlags.BeamIntensityPattern.get_Value())
+    jobproperties.Beam.bunchSpacing = int(runArgs.bunchSpacing) #FIXME This runArg should probably inherit from argInt rather than argFloat
+    PileUpConfigOverride=True
+if hasattr(runArgs,"pileupInitialBunch"):
+    if not (digitizationFlags.initialBunchCrossing.get_Value()==runArgs.pileupInitialBunch):
+        fast_chain_log.info( "Changing digitizationFlags.initialBunchCrossing from %s to %s", digitizationFlags.initialBunchCrossing.get_Value(),runArgs.pileupInitialBunch)
+        digitizationFlags.initialBunchCrossing=runArgs.pileupInitialBunch
+        PileUpConfigOverride=True
+if hasattr(runArgs,"pileupFinalBunch"):
+    if not (digitizationFlags.finalBunchCrossing.get_Value()==runArgs.pileupFinalBunch):
+        fast_chain_log.info( "Changing digitizationFlags.finalBunchCrossing from %s to %s", digitizationFlags.finalBunchCrossing.get_Value(),runArgs.pileupFinalBunch)
+        digitizationFlags.finalBunchCrossing=runArgs.pileupFinalBunch
+        PileUpConfigOverride=True
+if hasattr(runArgs,"digiSteeringConf"):
+    if not (digitizationFlags.digiSteeringConf.get_Value()==runArgs.digiSteeringConf+"PileUpToolsAlg"):
+        fast_chain_log.info( "Changing digitizationFlags.digiSteeringConf from %s to %s", digitizationFlags.digiSteeringConf.get_Value(),runArgs.digiSteeringConf)
+        digitizationFlags.digiSteeringConf=runArgs.digiSteeringConf+"PileUpToolsAlg"
+        PileUpConfigOverride=True
+if PileUpConfigOverride:
+    fast_chain_log.info( "NB Some pile-up (re-)configuration was done on the command-line.")
+del PileUpConfigOverride
 
-from ISF_Config.ISF_jobProperties import ISF_Flags
-if hasattr(runArgs, 'simulator'):
-    ISF_Flags.Simulator = runArgs.simulator
+
+#--------------------------------------------------------------
+# Get the flags
+#--------------------------------------------------------------
+if hasattr(runArgs,"digiSeedOffset1"):
+    digitizationFlags.rndmSeedOffset1=int(runArgs.digiSeedOffset1)
 else:
-    ISF_Flags.Simulator = 'MC12G4'
+    fast_chain_log.warning( 'digiSeedOffset1 not set' )
+    digitizationFlags.rndmSeedOffset1=1
 
-#### *********** import ISF_Example code here **************** ####
+if hasattr(runArgs,"digiSeedOffset2"):
+    digitizationFlags.rndmSeedOffset2=int(runArgs.digiSeedOffset2)
+else:
+    fast_chain_log.warning( 'digiSeedOffset2 not set' )
+    digitizationFlags.rndmSeedOffset2=2
 
-#include("ISF_Config/ISF_ConfigJobInclude.py")
+if hasattr(runArgs,"samplingFractionDbTag"): #FIXME change this to PhysicsList?
+    digitizationFlags.physicsList=runArgs.samplingFractionDbTag
 
+if hasattr(runArgs,"digiRndmSvc"):
+    digitizationFlags.rndmSvc=runArgs.digiRndmSvc
 
+if hasattr(runArgs,"PileUpPremixing"):
+    fast_chain_log.info("Doing pile-up premixing")
+    digitizationFlags.PileUpPremixing = runArgs.PileUpPremixing
 
+#--------------------------------------------------------------
+# Pileup configuration
+#--------------------------------------------------------------
+from SimuJobTransforms.SimTransformUtils import makeBkgInputCol
+def HasInputFiles(runArgs, key):
+    if hasattr(runArgs, key):
+        cmd='runArgs.%s' % key
+        if eval(cmd):
+            return True
+    return False
 
-########## ISF_ConfigJobInclude.py #################
+## Low Pt minbias set-up
+bkgArgName="LowPtMinbiasHitsFile"
+if hasattr(runArgs, "inputLowPtMinbiasHitsFile"):
+    bkgArgName="inputLowPtMinbiasHitsFile"
+if HasInputFiles(runArgs, bkgArgName):
+    exec("bkgArg = runArgs."+bkgArgName)
+    digitizationFlags.LowPtMinBiasInputCols = makeBkgInputCol(bkgArg,
+                                                              digitizationFlags.numberOfLowPtMinBias.get_Value(), True, fast_chain_log)
+if digitizationFlags.LowPtMinBiasInputCols.statusOn:
+    digitizationFlags.doLowPtMinBias = True
+else:
+    digitizationFlags.doLowPtMinBias = False
 
+## High Pt minbias set-up
+bkgArgName="HighPtMinbiasHitsFile"
+if hasattr(runArgs, "inputHighPtMinbiasHitsFile"):
+    bkgArgName="inputHighPtMinbiasHitsFile"
+if HasInputFiles(runArgs, bkgArgName):
+    exec("bkgArg = runArgs."+bkgArgName)
+    digitizationFlags.HighPtMinBiasInputCols = makeBkgInputCol(bkgArg,
+                                                               digitizationFlags.numberOfHighPtMinBias.get_Value(), True, fast_chain_log)
+if digitizationFlags.HighPtMinBiasInputCols.statusOn:
+    digitizationFlags.doHighPtMinBias = True
+else:
+    digitizationFlags.doHighPtMinBias = False
 
+## Cavern Background set-up
+bkgArgName="cavernHitsFile"
+if hasattr(runArgs, "inputCavernHitsFile"):
+    bkgArgName="inputCavernHitsFile"
+if HasInputFiles(runArgs, bkgArgName):
+    exec("bkgArg = runArgs."+bkgArgName)
+    digitizationFlags.cavernInputCols = makeBkgInputCol(bkgArg,
+                                                        digitizationFlags.numberOfCavern.get_Value(), (not digitizationFlags.cavernIgnoresBeamInt.get_Value()), fast_chain_log)
+if digitizationFlags.cavernInputCols.statusOn:
+    digitizationFlags.doCavern = True
+else:
+    digitizationFlags.doCavern = False
 
+## Beam Halo set-up
+bkgArgName="beamHaloHitsFile"
+if hasattr(runArgs, "inputBeamHaloHitsFile"):
+    bkgArgName="inputBeamHaloHitsFile"
+if HasInputFiles(runArgs, bkgArgName):
+    exec("bkgArg = runArgs."+bkgArgName)
+    digitizationFlags.beamHaloInputCols = makeBkgInputCol(bkgArg,
+                                                          digitizationFlags.numberOfBeamHalo.get_Value(), True, fast_chain_log)
+if digitizationFlags.beamHaloInputCols.statusOn:
+    digitizationFlags.doBeamHalo = True
+else:
+    digitizationFlags.doBeamHalo = False
 
-"""
-Common configurations for ISF
-KG Tan, 17/06/2012
-"""
+## Beam Gas set-up
+bkgArgName="beamGasHitsFile"
+if hasattr(runArgs, "inputBeamGasHitsFile"):
+    bkgArgName="inputBeamGasHitsFile"
+if HasInputFiles(runArgs, bkgArgName):
+    exec("bkgArg = runArgs."+bkgArgName)
+    digitizationFlags.beamGasInputCols = makeBkgInputCol(bkgArg,
+                                                         digitizationFlags.numberOfBeamGas.get_Value(), True, fast_chain_log)
+if digitizationFlags.beamGasInputCols.statusOn:
+    digitizationFlags.doBeamGas = True
+else:
+    digitizationFlags.doBeamGas = False
 
-include.block('ISF_Config/ISF_ConfigJobInclude.py')
-from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
-        getService,getServiceClone,getAlgorithm,getAlgorithmClone
 
 #--------------------------------------------------------------
-# Set to monte carlo
+# Other configuration: LVL1, turn off sub detectors, calo noise
 #--------------------------------------------------------------
-import AthenaCommon.AtlasUnixStandardJob
-from AthenaCommon import AthenaCommonFlags
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
 
-# TODO: ELLI: remove this once the envelopes are stored in the DDDB
-#             -> currently a fallback python definition is used
-#import shutil
+if hasattr(runArgs,"doAllNoise"):
+    if runArgs.doAllNoise!="NONE":
+        fast_chain_log.info('doAllNoise = %s: Overriding doInDetNoise, doCaloNoise and doMuonNoise', runArgs.doAllNoise)
+        if runArgs.doAllNoise=="True":
+            digitizationFlags.doInDetNoise=True
+            digitizationFlags.doCaloNoise=True
+            digitizationFlags.doMuonNoise=True
+        else:
+            digitizationFlags.doInDetNoise=False
+            digitizationFlags.doCaloNoise=False
+            digitizationFlags.doMuonNoise=False
+
+
+
+### No RDO output
+## Output RDO File
+if hasattr(runArgs,"outputRDOFile") or hasattr(runArgs,"tmpRDO"):
+    if hasattr(runArgs,"outputRDOFile"):
+        if hasattr(runArgs,"tmpRDO"):
+            fast_chain_log.fatal("Both outputRDOFile and tmpRDO specified - this configuration should not be used!")
+            raise SystemError
+        athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDOFile )
+    if hasattr(runArgs,"tmpRDO"):
+        athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.tmpRDO )
+    if hasattr(runArgs, "AddCaloDigi"):
+        AddCaloDigi = runArgs.AddCaloDigi
+        if AddCaloDigi:
+            fast_chain_log.info("Will write out all LArDigitContainers and TileDigitsContainers to RDO file.")
+            digitizationFlags.experimentalDigi+=["AddCaloDigi"]
+else:
+    fast_chain_log.info("no output file (outputRDOFile or tmpRDO) specified - switching off output StreamRDO")
+
+## Set Overall per-Algorithm time-limit on the AlgSequence
+topSequence.TimeOut = 43200 * Units.s
+
+try:
+    from RecAlgs.RecAlgsConf import TimingAlg
+    topSequence+=TimingAlg("SimTimerBegin", TimingObjOutputName = "EVNTtoHITS_timings")
+except:
+    fast_chain_log.warning('Could not add TimingAlg, no timing info will be written out.')
+
+#### *********** import ISF_Example code here **************** ####
+
+#include("ISF_Config/ISF_ConfigJobInclude.py")
+
+
+
+
+########## ISF_ConfigJobInclude.py #################
+
+
+
+
+"""
+Common configurations for ISF
+KG Tan, 17/06/2012
+"""
+
+#include.block('ISF_Config/ISF_ConfigJobInclude.py')
+
+#--------------------------------------------------------------
+# Set to monte carlo
+#--------------------------------------------------------------
+import AthenaCommon.AtlasUnixStandardJob
+from AthenaCommon.AppMgr import theApp
+from AthenaCommon.AppMgr import ServiceMgr
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+# TODO: ELLI: remove this once the envelopes are stored in the DDDB
+#             -> currently a fallback python definition is used
+#import shutil
 #import os.path
 #if os.path.exists('geomDB') and os.path.islink('geomDB'):
     #os.unlink('geomDB')
@@ -378,19 +639,16 @@ topSequence = AlgSequence()
 # Set the flags automatically here
 # (move it to the job options if not meant to be automatic!)
 #--------------------------------------------------------------
-import AthenaCommon.SystemOfUnits as Units
-
-from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be finalised before these functons are called
 
-from AthenaCommon.GlobalFlags import globalflags
 # --- set globalflags
 globalflags.DataSource.set_Value_and_Lock('geant4')
-globalflags.InputFormat.set_Value_and_Lock('pool')
-globalflags.DetGeo.set_Value_and_Lock('atlas')
+if jobproperties.Beam.beamType == "cosmics" :
+    globalflags.DetGeo.set_Value_and_Lock('commis')
+else:
+    globalflags.DetGeo.set_Value_and_Lock('atlas')
 globalflags.Luminosity.set_Off()
 
 # --- set SimLayout (synchronised to globalflags)
-from G4AtlasApps.SimFlags import simFlags
 if globalflags.DetDescrVersion() not in simFlags.SimLayout.get_Value():
     print "ERROR globalFlags.DetDescrVersion and simFlags.SimLayout do not match!"
     print "Please correct your job options."
@@ -404,20 +662,48 @@ simFlags.EventFilter.set_Off()
 # --- metadata passed by the evgen stage (move earlier?)
 from ISF_Example.ISF_Metadata import checkForSpecialConfigurationMetadata
 checkForSpecialConfigurationMetadata()
-
 #--------------------------------------------------------------
-# Job setup
+# Read Simulation MetaData (unless override flag set to True)
 #--------------------------------------------------------------
-theApp.EvtMax = athenaCommonFlags.EvtMax()
+#if 'ALL' in digitizationFlags.overrideMetadata.get_Value():
+#    fast_chain_log.info("Skipping input file MetaData check.")
+#else :
+#    from Digitization.DigitizationReadMetaData import readHITSFileMetadata
+#    readHITSFileMetadata()
+
 
 # all det description
 include('ISF_Config/AllDet_detDescr.py')
+
+DetFlags.Print()
+
+#check job configuration
+from Digitization.DigiConfigCheckers import checkDetFlagConfiguration
+checkDetFlagConfiguration()
+
+from FullChainTransforms.FastChainConfigCheckers import syncDigitizationAndSimulationJobProperties
+syncDigitizationAndSimulationJobProperties()
+
+#--------------------------------------------------------------
+# Pileup configuration
+#--------------------------------------------------------------
+from Digitization.DigiConfigCheckers import syncDetFlagsAndDigitizationJobProperties
+syncDetFlagsAndDigitizationJobProperties()
 DetFlags.Print()
 
 if len(globalflags.ConditionsTag()):
     from IOVDbSvc.CondDB import conddb
     conddb.setGlobalTag(globalflags.ConditionsTag())
 
+## Translate conditions tag into IOVDbSvc global tag: must be done before job properties are locked!!!
+if not hasattr(ServiceMgr, 'IOVDbSvc'):
+    from IOVDbSvc.IOVDbSvcConf import IOVDbSvc
+    ServiceMgr += IOVDbSvc()
+if not hasattr(globalflags, "ConditionsTag") or not globalflags.ConditionsTag.get_Value():
+    raise SystemExit("AtlasSimSkeleton._do_jobproperties :: Global ConditionsTag not set")
+if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.GlobalTag:
+        ServiceMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag.get_Value()
+
 # Temporary work-around - see ATLASSIM-2351
 if ISF_Flags.UsingGeant4():
     #include("G4AtlasApps/G4Atlas.flat.configuration.py") #HACK
@@ -427,88 +713,32 @@ if ISF_Flags.UsingGeant4():
 
     ## _PyG4AtlasComp.__init__
     ## If the random number service hasn't been set up already, do it now.
-    from G4AtlasApps.SimFlags import simFlags
     simFlags.RandomSeedList.useDefaultSeeds()
 
     ## AtlasSimSkeleton._do_jobproperties
     ## Import extra flags if it hasn't already been done
-    from G4AtlasApps.SimFlags import simFlags
     if "atlas_flags" not in simFlags.extra_flags:
         simFlags.load_atlas_flags()
-    from AthenaCommon.BeamFlags import jobproperties
     if jobproperties.Beam.beamType() == "cosmics" and "cosmics_flags" not in simFlags.extra_flags:
         simFlags.load_cosmics_flags()
 
-    from AthenaCommon.DetFlags import DetFlags
-    ## Tidy up DBM DetFlags: temporary measure
-    DetFlags.DBM_setOff()
-
-    ## Tidy up NSW DetFlags: temporary measure
-    DetFlags.sTGC_setOff()
-    DetFlags.Micromegas_setOff()
-    if hasattr(simFlags, 'SimulateNewSmallWheel'):
-        if simFlags.SimulateNewSmallWheel():
-            DetFlags.sTGC_setOn()
-            DetFlags.Micromegas_setOn()
-
-    ## Switch off tasks
-#    DetFlags.pileup.all_setOff()
-#    DetFlags.simulateLVL1.all_setOff()
-#    DetFlags.digitize.all_setOff()
-    if not simFlags.IsEventOverlayInputSim():
-        DetFlags.overlay.all_setOff()
-#    DetFlags.readRDOPool.all_setOff()
-#    DetFlags.makeRIO.all_setOff()
-#    DetFlags.writeBS.all_setOff()
-#    DetFlags.readRDOBS.all_setOff()
-#    DetFlags.readRIOBS.all_setOff()
-#    DetFlags.readRIOPool.all_setOff()
-#    DetFlags.writeRIOPool.all_setOff()
-#    DetFlags.writeRDOPool.all_setOff()
-
-    ## Global flags needed by externals
-    from AthenaCommon.GlobalFlags import globalflags
-    globalflags.DataSource = 'geant4'
-    if jobproperties.Beam.beamType() == 'cosmics':
-        globalflags.DetGeo = 'commis'
-    else:
-        globalflags.DetGeo = 'atlas'
-
-    ## At this point we can set the global job properties flag
-    globalflags.DetDescrVersion = simFlags.SimLayout.get_Value()
-
     # Switch off GeoModel Release in the case of parameterization
     if simFlags.LArParameterization.get_Value()>0 and simFlags.ReleaseGeoModel():
         simFlags.ReleaseGeoModel = False
 
-    ## Translate conditions tag into IOVDbSvc global tag: must be done before job properties are locked!!!
-    from AthenaCommon.AppMgr import ServiceMgr
-    from IOVDbSvc.IOVDbSvcConf import IOVDbSvc
-    ServiceMgr += IOVDbSvc()
-    if not hasattr(globalflags, "ConditionsTag") or not globalflags.ConditionsTag.get_Value():
-        raise SystemExit("AtlasSimSkeleton._do_jobproperties :: Global ConditionsTag not set")
-    if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.GlobalTag:
-        ServiceMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag.get_Value()
-
     ## Enable floating point exception handling
     ## FIXME! This seems to cause the jobs to crash in the FpeControlSvc, so commenting this out for now...
-    #from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
     #athenaCommonFlags.RuntimeStrictness = 'abort'
 
-    if not simFlags.ISFRun:
-        from G4AtlasApps.G4Atlas_Metadata import checkForSpecialConfigurationMetadata
-        checkForSpecialConfigurationMetadata()
-
     from AthenaCommon.JobProperties import jobproperties
+
     DetFlags.Print()
-    jobproperties.print_JobProperties('tree&value')
 
-    # Lock the job properties if not running ISF.
-    if not simFlags.ISFRun:
-        jobproperties.lock_JobProperties()
+
+    jobproperties.print_JobProperties('tree&value')
 
     ## AtlasSimSkeleton._do_external
-    from AthenaCommon.AppMgr import ToolSvc,ServiceMgr
+    from AthenaCommon.AppMgr import ToolSvc
     from Geo2G4.Geo2G4Conf import Geo2G4Svc
     geo2G4Svc = Geo2G4Svc()
     theApp.CreateSvc += ["Geo2G4Svc"]
@@ -519,20 +749,18 @@ if ISF_Flags.UsingGeant4():
     ## GeoModel stuff
     ## TODO: Tidy imports etc.
     from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
-    from AthenaCommon.GlobalFlags import jobproperties
     from AtlasGeoModel import SetGeometryVersion
 
     ## Forward Region Twiss files - needed before geometry setup!
-    from G4AtlasApps.SimFlags import simFlags
+
     if simFlags.ForwardDetectors.statusOn:
         if DetFlags.geometry.FwdRegion_on():
-            from AthenaCommon.CfgGetter import getPublicTool
             from AthenaCommon.AppMgr import ToolSvc
-            ToolSvc += getPublicTool("ForwardRegionProperties")
+            ToolSvc += CfgGetter.getPublicTool("ForwardRegionProperties")
+
 
     from AtlasGeoModel import GeoModelInit
     from AtlasGeoModel import SimEnvelopes
-    from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
     gms = GeoModelSvc()
     ## Cosmics GeoModel tweaks
     if jobproperties.Beam.beamType() == 'cosmics' or \
@@ -567,7 +795,6 @@ if ISF_Flags.UsingGeant4():
         ## Additional material in the muon system
         from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
         AGDD2Geo = AGDDtoGeoSvc()
-        from AthenaCommon import CfgGetter
         if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders:
             ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True)
             AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"]
@@ -582,285 +809,28 @@ if ISF_Flags.UsingGeant4():
     ## Add configured GeoModelSvc to service manager
     ServiceMgr += gms
 
-    ## AtlasSimSkeleton._do_metadata
-    from G4AtlasApps.SimFlags import simFlags
-    if not simFlags.ISFRun:
-        from G4AtlasApps.G4Atlas_Metadata import createSimulationParametersMetadata
-        createSimulationParametersMetadata()
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        if not athenaCommonFlags.PoolHitsOutput.statusOn:
-            print 'AtlasSimSkeleton._do_metadata :: no output HITS file, so no metadata writing required.'
-        else:
-            from AthenaServices.AthenaServicesConf import AthenaOutputStream
-            stream1_SimMetaData = AthenaOutputStream("StreamHITS_SimMetaData")
-            stream1_SimMetaData.ItemList += [ "IOVMetaDataContainer#*" ]
-
-    if not simFlags.ISFRun:
-        def hits_persistency():
-            """ HITS POOL file persistency
-            """
-            from G4AtlasApps.SimFlags import simFlags
-            from AthenaCommon.DetFlags import DetFlags
-            from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-            from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-
-            ## Not yet understood, but need to treat StreamHITS as alg in Hive.
-            ## Seems to also work fine outside of Hive, but to be extra safe I'm
-            ## only changing it in Hive.
-            from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
-            if concurrencyProps.ConcurrencyFlags.NumThreads() > 0:
-                as_alg = True
-            else:
-                as_alg = False
-            ## NB. Two-arg constructor is needed, since otherwise metadata writing fails!
-            stream1 = AthenaPoolOutputStream("StreamHITS", athenaCommonFlags.PoolHitsOutput(), asAlg=as_alg)
-
-            ## Write geometry tag info - move to main method
-            #import EventInfoMgt.EventInfoMgtInit
-
-            ## EventInfo & TruthEvent always written by default
-            stream1.ForceRead=True
-            stream1.ItemList = ["EventInfo#*",
-                                "McEventCollection#TruthEvent",
-                                "JetCollection#*"]
-
-            ## If we are running quasi-stable particle simulation, include the original event record
-            if hasattr(simFlags,'IncludeParentsInG4Event') and simFlags.IncludeParentsInG4Event.statusOn and simFlags.IncludeParentsInG4Event():
-                stream1.ItemList += ["McEventCollection#GEN_EVENT"]
-
-            stream1.ItemList += ["xAOD::JetContainer#*",
-                                 "xAOD::JetAuxContainer#*"]
-
-            ## Make stream aware of aborted events
-            stream1.AcceptAlgs = ["G4AtlasAlg"]
-
-            ## Detectors
-
-            ## Inner Detector
-            if DetFlags.ID_on():
-                stream1.ItemList += ["SiHitCollection#*",
-                                     "TRTUncompressedHitCollection#*",
-                                     "TrackRecordCollection#CaloEntryLayer"]
-            ## Calo
-            if DetFlags.Calo_on():
-                stream1.ItemList += ["CaloCalibrationHitContainer#*",
-                                     "LArHitContainer#*",
-                                     "TileHitVector#*",
-                                     #"SimpleScintillatorHitCollection#*",
-                                     "TrackRecordCollection#MuonEntryLayer"]
-            ## Muon
-            if DetFlags.Muon_on():
-                stream1.ItemList += ["RPCSimHitCollection#*",
-                                     "TGCSimHitCollection#*",
-                                     "CSCSimHitCollection#*",
-                                     "MDTSimHitCollection#*",
-                                     "TrackRecordCollection#MuonExitLayer"]
-                if hasattr(simFlags, 'SimulateNewSmallWheel'):
-                    if simFlags.SimulateNewSmallWheel():
-                        stream1.ItemList += ["GenericMuonSimHitCollection#*"]
-            ## Lucid
-            if DetFlags.Lucid_on():
-                stream1.ItemList += ["LUCID_SimHitCollection#*"]
-
-            ## FwdRegion
-            if DetFlags.FwdRegion_on():
-                stream1.ItemList += ["SimulationHitCollection#*"]
-
-            ## ZDC
-            if DetFlags.ZDC_on():
-                stream1.ItemList += ["ZDC_SimPixelHit_Collection#*",
-                                     "ZDC_SimStripHit_Collection#*"]
-            ## ALFA
-            if DetFlags.ALFA_on():
-                stream1.ItemList += ["ALFA_HitCollection#*",
-                                     "ALFA_ODHitCollection#*"]
-
-            ## AFP
-            if DetFlags.AFP_on():
-                stream1.ItemList += ["AFP_TDSimHitCollection#*",
-                                     "AFP_SIDSimHitCollection#*"]
-
-            ### Ancillary scintillators
-            #stream1.ItemList += ["ScintillatorHitCollection#*"]
-
-            ## TimingAlg
-            stream1.ItemList +=["RecoTimingObj#EVNTtoHITS_timings"]
-
-            ## Add cosmics and test beam configuration hit persistency if required cf. geom tag
-            layout = simFlags.SimLayout.get_Value()
-            if "tb" not in layout:
-                from AthenaCommon.BeamFlags import jobproperties
-                if jobproperties.Beam.beamType() == 'cosmics' or \
-                        (hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn) or \
-                        (hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn):
-                    stream1.ItemList += ["TrackRecordCollection#CosmicRecord", "TrackRecordCollection#CosmicPerigee"]
-            else:
-                ## CTB-specific
-                if layout.startswith("ctb"):
-                    if simFlags.LArFarUpstreamMaterial.statusOn and simFlags.LArFarUpstreamMaterial.get_Value():
-                        stream1.ItemList.append("TrackRecordCollection#LArFarUpstreamMaterialExitLayer")
-                ## Persistency of test-beam layout
-                if layout.startswith('ctb') or layout.startswith('tb_Tile2000_'):
-                    stream1.ItemList += ["TBElementContainer#*"]
-
-
-        def evgen_persistency():
-            """ EVGEN POOL file persistency
-            """
-            from G4AtlasApps.SimFlags import simFlags
-            from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-            ## NB. Two-arg constructor is needed, since otherwise metadata writing fails!
-            if hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn:
-                stream2 = AthenaPoolOutputStream("StreamEVGEN", simFlags.WriteTR.get_Value())
-                stream2.ItemList += ["IOVMetaDataContainer#*",
-                                     "EventInfo#*"]
-                if simFlags.CavernBG.statusOn and 'Write' in simFlags.CavernBG.get_Value():
-                    stream2.ItemList += ["TrackRecordCollection#NeutronBG"]
-                else:
-                    stream2.ItemList += ["TrackRecordCollection#CosmicRecord"]
-                stream2.AcceptAlgs = ["G4AtlasAlg"]
-            if hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn:
-                stream2 = AthenaPoolOutputStream("StreamEVGEN", simFlags.StoppedParticleFile.get_Value())
-                stream2.ItemList += ["IOVMetaDataContainer#*",
-                                     "EventInfo#*"]
-                stream2.ItemList += ["TrackRecordCollection#StoppingPositions"]
-                stream2.AcceptAlgs = ["G4AtlasAlg"]
-
-
-        def will_write_output_files():
-            """ Check if any POOL files will be written by this job
-            """
-            from G4AtlasApps.SimFlags import simFlags
-            from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-            if athenaCommonFlags.PoolHitsOutput.statusOn:
-                return True
-            elif ("tb" not in simFlags.SimLayout.get_Value()):
-                if hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn:
-                    return True
-                elif hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn:
-                    return True
-            return False
-
-
-        def do_run_number_modifications():
-            """ Set the run number in the simulation.  In order of priority, use:
-            - The RunNumber flag
-            - The input file run number """
-            # FIXME This method is called from both _do_persistency and _do_All for AtlasG4 jobs!
-            from G4AtlasApps.G4Atlas_Metadata import configureRunNumberOverrides
-            configureRunNumberOverrides()
-
-
-        ## SimSkeleton._do_readevgen
-        from G4AtlasApps.SimFlags import simFlags
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        ## ReadTR is only present in simFlags for ATLAS geometries with cosmics switched on
-        if (not simFlags.ISFRun) and hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn:
-            include("CosmicGenerator/SetCosmicGenerator.py")
-
-        if athenaCommonFlags.PoolEvgenInput.statusOn:
-            ## Tell the event selector about the evgen input files and event skipping
-            if not hasattr(svcMgr, 'EventSelector'):
-                import AthenaPoolCnvSvc.ReadAthenaPool
-            svcMgr.EventSelector.InputCollections = athenaCommonFlags.PoolEvgenInput()
-            if athenaCommonFlags.SkipEvents.statusOn:
-                svcMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
-            from G4AtlasApps.G4Atlas_Metadata import inputFileValidityCheck
-            inputFileValidityCheck()
-        else:
-            ## No input file so assume that we are running a Generator in the same job
-            if not hasattr(svcMgr, 'EventSelector'):
-                import AthenaCommon.AtlasUnixGeneratorJob
-            # TODO: Check that there is at least one algorithm already in the AlgSequence?
-            ## Warn if attempting to skip events in a generator job
-            if athenaCommonFlags.SkipEvents.statusOn and athenaCommonFlags.SkipEvents()!=0:
-                msg = "SimSkeleton._do_readevgen :: athenaCommonFlags.SkipEvents set in a job without an active "
-                msg += "athenaCommonFlags.PoolEvgenInput flag: ignoring event skip request"
-                print msg
-
-        ## SimSkeleton._do_persistency
-        from G4AtlasApps.SimFlags import simFlags
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        if will_write_output_files():
-            ## Write hits in POOL
-            ## The following used to be in G4AtlasApps/HitAthenaPoolWriteOptions
-            from AthenaCommon.DetFlags import DetFlags
-            from AthenaCommon.Configurable import Configurable
-            from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-
-            ## Default setting for one output stream
-            from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-            svcMgr.AthenaPoolCnvSvc.PoolAttributes += ["TREE_BRANCH_OFFSETTAB_LEN = '100'"]
-            # Recommendations from Peter vG 16.08.25
-            svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolHitsOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '1'" ]
-
-            ## Write geometry tag info
-            import EventInfoMgt.EventInfoMgtInit
-
-            ## Patch metadata if required
-            from G4AtlasApps.G4Atlas_Metadata import patch_mc_channel_numberMetadata
-            patch_mc_channel_numberMetadata()
-
-            ## Instantiate StreamHITS
-            if athenaCommonFlags.PoolHitsOutput.statusOn:
-                hits_persistency()
-
-            ## StreamEVGEN: needed for cosmic simulations and cavern BG
-            ## Separate stream of track record (TR) info -- it does not apply to the CTB simulations.
-            # TODO: Can this be merged into the cosmics sec above, or do the AthenaPool includes *need* to be in-between?
-            if "tb" not in simFlags.SimLayout.get_Value():
-                evgen_persistency()
-
-        # Check on run numbers and update them if necessary
-        do_run_number_modifications()
-
-
-    ## _PyG4AtlasComp.initialize
-    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-    if athenaCommonFlags.EvtMax.statusOn:# and theApp.EvtMax == -1:
-        theApp.EvtMax = athenaCommonFlags.EvtMax()
-
-
-
 
     ###################Back to ISF_ConfigJobInclude.py################
 
 #--------------------------------------------------------------
 # Setup the ISF Services
 #--------------------------------------------------------------
-# --- load AuditorSvc
-from AthenaCommon.ConfigurableDb import getConfigurable
-# --- write out summary of the memory usage
-#   | number of events to be skip to detect memory leak
-#   | 20 is default. May need to be made larger for complete jobs.
-ServiceMgr.AuditorSvc += getConfigurable("ChronoAuditor")()
-# --- write out a short message upon entering or leaving each algorithm
-# ServiceMgr.AuditorSvc += getConfigurable("NameAuditor")()
-#
-theApp.AuditAlgorithms = True
-theApp.AuditServices   = True
-#
-# --- Display detailed size and timing statistics for writing and reading
-ServiceMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True
 
 #--------------------------------------------------------------
 # ISF input
 #--------------------------------------------------------------
 
 # Note: automatically adds generator to TopSequence if applicable
-from AthenaCommon.BeamFlags import jobproperties
 # if an input sting identifier was given, use ISF input definitions
 if ISF_Flags.Input()!="NONE":
-    getAlgorithm('ISF_Input_' + ISF_Flags.Input())
+    CfgGetter.getAlgorithm('ISF_Input_' + ISF_Flags.Input())
 # cosmics input
 elif jobproperties.Beam.beamType.get_Value() == 'cosmics':
-    from G4AtlasApps.SimFlags import simFlags
     simFlags.load_cosmics_flags()
     if simFlags.ReadTR.statusOn:
-        getAlgorithm('TrackRecordCosmicGenerator')
+        CfgGetter.getAlgorithm('TrackRecordCosmicGenerator')
     else:
-        getAlgorithm('EvgenCosmicGenerator')
+        CfgGetter.getAlgorithm('EvgenCosmicGenerator')
 # non of the above
 
 elif not athenaCommonFlags.PoolEvgenInput.statusOn:
@@ -869,12 +839,11 @@ elif not athenaCommonFlags.PoolEvgenInput.statusOn:
 else :
     if ISF_Flags.OverrideInputFiles():
         athenaCommonFlags.PoolEvgenInput = ISF_Flags.OverrideInputFiles()
-    getAlgorithm('ISF_Input_GenericFiles')
+    CfgGetter.getAlgorithm('ISF_Input_GenericFiles')
 
 from ISF_Example.ISF_Input import ISF_Input
 
-from AthenaCommon.CfgGetter import getAlgorithm
-topSeq += getAlgorithm("BeamEffectsAlg")
+topSequence += CfgGetter.getAlgorithm("BeamEffectsAlg")
 
 #--------------------------------------------------------------
 # ISF kernel configuration
@@ -883,29 +852,9 @@ topSeq += getAlgorithm("BeamEffectsAlg")
 # 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())
+collection_merger_alg = CfgGetter.getAlgorithm('ISF_CollectionMerger')
 
-#--------------------------------------------------------------
-# Setup the random number streams
-#--------------------------------------------------------------
-from G4AtlasApps.SimFlags import SimFlags,simFlags;
-if not athenaCommonFlags.PoolEvgenInput.statusOn:
-    if not simFlags.RandomSeedList.checkForExistingSeed('SINGLE'):
-        simFlags.RandomSeedList.addSeed( "SINGLE", 43657613, 78935670 )
-if not simFlags.RandomSeedList.checkForExistingSeed('VERTEX'):
-  simFlags.RandomSeedList.addSeed( 'VERTEX', 9123448, 829143 )
-simFlags.RandomSeedList.addtoService()
-simFlags.RandomSeedList.printSeeds()
-
-#--------------------------------------------------------------
-# Setup the ISF Output
-#--------------------------------------------------------------
-from ISF_Example.ISF_Output import ISF_HITSStream
-from ISF_Example.ISF_Metadata import createSimulationParametersMetadata, configureRunNumberOverrides
-createSimulationParametersMetadata()
-configureRunNumberOverrides()
+SimKernel = CfgGetter.getAlgorithm(ISF_Flags.Simulator.KernelName())
 
 if ISF_Flags.HITSMergingRequired():
     topSequence += collection_merger_alg
@@ -931,13 +880,14 @@ if ISF_Flags.RunVP1() :
     # VP1 part (better switch off PerMon when using VP1)
     from VP1Algs.VP1AlgsConf import VP1Alg
     topSequence += VP1Alg()
-
-elif ISF_Flags.DoPerfMonStats() :
     # Performance Monitoring (VP1 does not like this)
     # https://twiki.cern.ch/twiki/bin/viewauth/Atlas/PerfMonSD
-    from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties
-    pmon_properties.PerfMonFlags.doMonitoring=True
-    pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True
+    pmon_properties.PerfMonFlags.doMonitoring=False
+    pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=False
+
+if not ISF_Flags.DoPerfMonStats() :
+    pmon_properties.PerfMonFlags.doMonitoring=False
+    pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=False
 
 
 if ISF_Flags.DumpMcEvent() :
@@ -964,7 +914,7 @@ print topSequence
 
 ## check to see if  pileup emulation is being used, if so do post-ISF-config
 ## actions to enable simulation of pileup collection
-if 'AthSequencer/EvgenGenSeq' in topSeq.getSequence():
+if 'AthSequencer/EvgenGenSeq' in topSequence.getSequence():
     fast_chain_log.info("Pileup emulation enabled - setup GenEventStackFiller")
     #include("FastChainPileup/FastPileupSimConfig.py")
 
@@ -975,15 +925,17 @@ if 'AthSequencer/EvgenGenSeq' in topSeq.getSequence():
     OutputPileupTruthCollection='TruthEvent_PU'
     # ToolSvc.ISF_StackFiller.OutputLevel=DEBUG
 
-    
+
     ###############Back to MyCustomSkeleton######################
 
 ## Add AMITag MetaData to TagInfoMgr
 if hasattr(runArgs, 'AMITag'):
     if runArgs.AMITag != "NONE":
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag]
 
+from ISF_Example.ISF_Metadata import patch_mc_channel_numberMetadata
+patch_mc_channel_numberMetadata()
+
 ### Changing to post-sim include/exec
 ## Post-include
 if hasattr(runArgs, "postSimInclude"):
@@ -1015,75 +967,15 @@ if hasattr(runArgs, "postSimExec"):
 # Creation: David Cote (September 2009)                              #
 #                                                                    #
 ######################################################################
-from AthenaCommon.GlobalFlags import globalflags
-from AthenaCommon.BeamFlags import jobproperties
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 #from AthenaCommon.BFieldFlags import jobproperties ##Not sure if this is appropriate for G4 sim
 
-## Max/skip events
-if hasattr(runArgs,"skipEvents"):
-    athenaCommonFlags.SkipEvents.set_Value_and_Lock( runArgs.skipEvents )
-if hasattr(runArgs,"maxEvents"):
-    athenaCommonFlags.EvtMax.set_Value_and_Lock( runArgs.maxEvents )
-else:
-    athenaCommonFlags.EvtMax=-1
-
-if hasattr(runArgs,"conditionsTag"):
-    if runArgs.conditionsTag != 'NONE':
-        globalflags.ConditionsTag.set_Value_and_Lock( runArgs.conditionsTag ) #make this one compulsory?
-if hasattr(runArgs,"beamType"):
-    if runArgs.beamType != 'NONE':
-        # Setting beamType='cosmics' keeps cavern in world volume for g4sim also with non-commissioning geometries
-        jobproperties.Beam.beamType.set_Value_and_Lock( runArgs.beamType )
-## if hasattr(runArgs,"AMITag"): rec.AMITag=runArgs.AMITag
-## if hasattr(runArgs,"userExec"): rec.UserExecs=runArgs.userExec
-## if hasattr(runArgs,"RunNumber"): rec.RunNumber=runArgs.RunNumber
-## if hasattr(runArgs,"projectName"): rec.projectName=runArgs.projectName
-## if hasattr(runArgs,"trigStream"): rec.triggerStream=runArgs.trigStream
-## if hasattr(runArgs,"triggerConfig"):
-##     from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
-##     tf.triggerConfig=runArgs.triggerConfig
-
-# Avoid command line preInclude for event service
-if hasattr(runArgs, "eventService") and runArgs.eventService:
-    include('AthenaMP/AthenaMP_EventService.py')
-
 ## autoConfiguration keywords triggering pre-defined functions
 ## if hasattr(runArgs,"autoConfiguration"):
 ##     for key in runArgs.autoConfiguration:
 ##         rec.AutoConfiguration.append(key)
 
-from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties
-pmon_properties.PerfMonFlags.doMonitoring=True
-pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True
-
-
 #################Back to MyCustomSkeleton##################################
 
-if hasattr(runArgs, "jobNumber"):
-    if runArgs.jobNumber < 1:
-        raise ValueError('jobNumber must be a postive integer. %s lies outside this range', str(runArgs.jobNumber))
-
-from AthenaCommon.GlobalFlags import globalflags
-if hasattr(runArgs,"geometryVersion"):
-    # strip _VALIDATION
-    print "stripping _VALIDATION"
-    if runArgs.geometryVersion.endswith("_VALIDATION"):
-        pos=runArgs.geometryVersion.find("_VALIDATION")
-        globalflags.DetDescrVersion.set_Value_and_Lock( runArgs.geometryVersion[:pos] )
-    else:
-        globalflags.DetDescrVersion.set_Value_and_Lock( runArgs.geometryVersion )
-
-### Do not invoke another logger
-# get the logger
-#from AthenaCommon.Logging import logging
-digilog = logging.getLogger('Digi_trf')
-fast_chain_log.info( '****************** STARTING DIGITIZATION *****************' )
-
-
-fast_chain_log.info( '**** Transformation run arguments' )
-fast_chain_log.info( str(runArgs) )
-
 #==============================================================
 # Job Configuration parameters:
 #==============================================================
@@ -1101,298 +993,242 @@ if hasattr(runArgs,"preDigiInclude"):
         include(fragment)
 
 #--------------------------------------------------------------
-# Override pile-up configuration on the command-line
+# Go for it
 #--------------------------------------------------------------
+print "lvl1: -14... " + str(DetFlags.digitize.LVL1_on())
 
-from Digitization.DigitizationFlags import digitizationFlags
 
-#--------------------------------------------------------------
-# Get the flags
-#--------------------------------------------------------------
-if hasattr(runArgs,"digiSeedOffset1"):
-    digitizationFlags.rndmSeedOffset1=int(runArgs.digiSeedOffset1)
-else:
-    fast_chain_log.warning( 'digiSeedOffset1 not set' )
-    digitizationFlags.rndmSeedOffset1=1
 
-if hasattr(runArgs,"digiSeedOffset2"):
-    digitizationFlags.rndmSeedOffset2=int(runArgs.digiSeedOffset2)
-else:
-    fast_chain_log.warning( 'digiSeedOffset2 not set' )
-    digitizationFlags.rndmSeedOffset2=2
+#include ("Digitization/Digitization.py")
 
-if hasattr(runArgs,"samplingFractionDbTag"): #FIXME change this to PhysicsList?
-    digitizationFlags.physicsList=runArgs.samplingFractionDbTag
+########## Digitization.py ##########################
 
-if hasattr(runArgs,"digiRndmSvc"):
-    digitizationFlags.rndmSvc=runArgs.digiRndmSvc
 
-if hasattr(runArgs,"conditionsTag"):
-    if(runArgs.conditionsTag!='NONE'):
-        digitizationFlags.IOVDbGlobalTag = runArgs.conditionsTag
 
-### Avoid meta data reading
-digitizationFlags.overrideMetadata=['ALL']
 
-if hasattr(runArgs,"digiSteeringConf"):
-    if not (digitizationFlags.digiSteeringConf.get_Value()==runArgs.digiSteeringConf+"PileUpToolsAlg"):
-        digilog.info( "Changing digitizationFlags.digiSteeringConf from %s to %s", digitizationFlags.digiSteeringConf.get_Value(),runArgs.digiSteeringConf)
-        digitizationFlags.digiSteeringConf=runArgs.digiSteeringConf+"PileUpToolsAlg"
-        PileUpConfigOverride=True
+###############################################################
+#
+# Job options file to run:
+#        Digitization
+#        LVL1 Simulation
+#        ByteStream conversion
+#
+# Author: Sven Vahsen and John Chapman
+#==============================================================
 
 #--------------------------------------------------------------
-# Pileup configuration - removed as pileup will be handled on-the-fly
+# Get Digitization Flags (This sets Global and Det Flags)
 #--------------------------------------------------------------
-from SimuJobTransforms.SimTransformUtils import makeBkgInputCol
-def HasInputFiles(runArgs, key):
-    if hasattr(runArgs, key):
-        cmd='runArgs.%s' % key
-        if eval(cmd):
-            return True
-    return False
 
-## Low Pt minbias set-up
-bkgArgName="LowPtMinbiasHitsFile"
-if hasattr(runArgs, "inputLowPtMinbiasHitsFile"):
-    bkgArgName="inputLowPtMinbiasHitsFile"
-if HasInputFiles(runArgs, bkgArgName):
-    exec("bkgArg = runArgs."+bkgArgName)
-    digitizationFlags.LowPtMinBiasInputCols = makeBkgInputCol(bkgArg,
-                                                              digitizationFlags.numberOfLowPtMinBias.get_Value(), True, fast_chain_log)
-if digitizationFlags.LowPtMinBiasInputCols.statusOn:
-    digitizationFlags.doLowPtMinBias = True
-else:
-    digitizationFlags.doLowPtMinBias = False
+#-------------------------------------------
+# Print Job Configuration
+#-------------------------------------------
+DetFlags.Print()
+fast_chain_log.info("Global jobProperties values:")
+globalflags.print_JobProperties()
+fast_chain_log.info("Digitization jobProperties values:")
+digitizationFlags.print_JobProperties()
 
-## High Pt minbias set-up
-bkgArgName="HighPtMinbiasHitsFile"
-if hasattr(runArgs, "inputHighPtMinbiasHitsFile"):
-    bkgArgName="inputHighPtMinbiasHitsFile"
-if HasInputFiles(runArgs, bkgArgName):
-    exec("bkgArg = runArgs."+bkgArgName)
-    digitizationFlags.HighPtMinBiasInputCols = makeBkgInputCol(bkgArg,
-                                                               digitizationFlags.numberOfHighPtMinBias.get_Value(), True, fast_chain_log)
-if digitizationFlags.HighPtMinBiasInputCols.statusOn:
-    digitizationFlags.doHighPtMinBias = True
-else:
-    digitizationFlags.doHighPtMinBias = False
+#--------------------------------------------------------------
+# Configure the job using jobproperties
+#--------------------------------------------------------------
 
-## Cavern Background set-up
-bkgArgName="cavernHitsFile"
-if hasattr(runArgs, "inputCavernHitsFile"):
-    bkgArgName="inputCavernHitsFile"
-if HasInputFiles(runArgs, bkgArgName):
-    exec("bkgArg = runArgs."+bkgArgName)
-    digitizationFlags.cavernInputCols = makeBkgInputCol(bkgArg,
-                                                        digitizationFlags.numberOfCavern.get_Value(), (not digitizationFlags.cavernIgnoresBeamInt.get_Value()), fast_chain_log)
-if digitizationFlags.cavernInputCols.statusOn:
-    digitizationFlags.doCavern = True
-else:
-    digitizationFlags.doCavern = False
+#include("Digitization/ConfigDigitization.py")
 
-## Beam Halo set-up
-bkgArgName="beamHaloHitsFile"
-if hasattr(runArgs, "inputBeamHaloHitsFile"):
-    bkgArgName="inputBeamHaloHitsFile"
-if HasInputFiles(runArgs, bkgArgName):
-    exec("bkgArg = runArgs."+bkgArgName)
-    digitizationFlags.beamHaloInputCols = makeBkgInputCol(bkgArg,
-                                                          digitizationFlags.numberOfBeamHalo.get_Value(), True, fast_chain_log)
-if digitizationFlags.beamHaloInputCols.statusOn:
-    digitizationFlags.doBeamHalo = True
-else:
-    digitizationFlags.doBeamHalo = False
+####### Digitization/ConfigDigitization.py
 
-## Beam Gas set-up
-bkgArgName="beamGasHitsFile"
-if hasattr(runArgs, "inputBeamGasHitsFile"):
-    bkgArgName="inputBeamGasHitsFile"
-if HasInputFiles(runArgs, bkgArgName):
-    exec("bkgArg = runArgs."+bkgArgName)
-    digitizationFlags.beamGasInputCols = makeBkgInputCol(bkgArg,
-                                                         digitizationFlags.numberOfBeamGas.get_Value(), True, fast_chain_log)
-if digitizationFlags.beamGasInputCols.statusOn:
-    digitizationFlags.doBeamGas = True
-else:
-    digitizationFlags.doBeamGas = False
+#Pool input
+if not hasattr(ServiceMgr, 'EventSelector'):
+    import AthenaPoolCnvSvc.ReadAthenaPool
+if hasattr(ServiceMgr, 'PoolSvc'):
+    ServiceMgr.PoolSvc.MaxFilesOpen = 0 # Never close Input Files
+#Settings the following attributes reduces the job size slightly
+#ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [  "TREE_BRANCH_OFFSETTAB_LEN ='100'" ]
+#ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DEFAULT_BUFFERSIZE = '2048'" ]
 
+#--------------------------------------------------------------
+# GeoModel
+#--------------------------------------------------------------
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+from AtlasGeoModel import SetupRecoGeometry
 
 #--------------------------------------------------------------
-# Other configuration: LVL1, turn off sub detectors, calo noise
+# Magnetic field service
 #--------------------------------------------------------------
+import MagFieldServices.SetupField
 
-if hasattr(runArgs,"doAllNoise"):
-    if runArgs.doAllNoise!="NONE":
-        fast_chain_log.info('doAllNoise = %s: Overriding doInDetNoise, doCaloNoise and doMuonNoise', runArgs.doAllNoise)
-        if runArgs.doAllNoise=="True":
-            digitizationFlags.doInDetNoise=True
-            digitizationFlags.doCaloNoise=True
-            digitizationFlags.doMuonNoise=True
-        else:
-            digitizationFlags.doInDetNoise=False
-            digitizationFlags.doCaloNoise=False
-            digitizationFlags.doMuonNoise=False
+#--------------------------------------------------------------
+# Configure Run and Lumi Block and Pile-Up Lumi overriding
+# (if required)
+#--------------------------------------------------------------
+if digitizationFlags.RunAndLumiOverrideList.statusOn:
+    if not(DetFlags.pileup.any_on()):
+        AthError( "This job will try to override pile-up luminosity configuration, but no pile-up will be set up!" )
+    include("Digitization/LumiBlockOverrides.py")
+    if digitizationFlags.dataRunNumber.statusOn:
+        fast_chain_log.warning('digitizationFlags.RunAndLumiOverrideList has been set! digitizationFlags.dataRunNumber (set to %s) will be ignored. ', digitizationFlags.dataRunNumber.get_Value() )
+else:
+    include("Digitization/RunNumberOverride.py")
 
+#-----------------------------------------------------------
+# Check Beam and Digitization jobproperties are synchronised
+#-----------------------------------------------------------
+from Digitization.DigiConfigCheckers import syncBeamAndDigitizationJobProperties
+syncBeamAndDigitizationJobProperties()
 
+digitizationFlags.lockMostFlags()
+#--------------------------------------------------------------
+# More Pileup configuration
+#--------------------------------------------------------------
+if DetFlags.pileup.any_on() or digitizationFlags.doXingByXingPileUp():
+    # protection for SteppingCache usage - currently incompatible with PileUpTools
+    if digitizationFlags.SignalPatternForSteppingCache.statusOn and digitizationFlags.doXingByXingPileUp():
+        raise RuntimeError("SteppingCache is incompatible with PileUpTools. Please switch off either digitizationFlags.SignalPatternForSteppingCache or digitizationFlags.doXingByXingPileUp.")
+    include( "Digitization/ConfigPileUpEventLoopMgr.py" )
+if DetFlags.pileup.any_on():
+    fast_chain_log.info("PILEUP CONFIGURATION:")
+    fast_chain_log.info(" -----> Luminosity = %s cm^-2 s^-1", jobproperties.Beam.estimatedLuminosity())
+    fast_chain_log.info(" -----> Bunch Spacing = %s ns", digitizationFlags.bunchSpacing.get_Value())
 
-### No RDO output
-## Output RDO File
-if hasattr(runArgs,"outputRDOFile") or hasattr(runArgs,"tmpRDO"):
-    if hasattr(runArgs,"outputRDOFile"):
-        if hasattr(runArgs,"tmpRDO"):
-            fast_chain_log.fatal("Both outputRDOFile and tmpRDO specified - this configuration should not be used!")
-            raise SystemError
-        athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDOFile )
-    if hasattr(runArgs,"tmpRDO"):
-        athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.tmpRDO )
-    if hasattr(runArgs, "AddCaloDigi"):
-        AddCaloDigi = runArgs.AddCaloDigi
-        if AddCaloDigi:
-            fast_chain_log.info("Will write out all LArDigitContainers and TileDigitsContainers to RDO file.")
-            digitizationFlags.experimentalDigi+=["AddCaloDigi"]
-else:
-    fast_chain_log.info("no output file (outputRDOFile or tmpRDO) specified - switching off output StreamRDO")
+# in any case we need the PileUpMergeSvc for the digitize algos
+if not hasattr(ServiceMgr, 'PileUpMergeSvc'):
+    ServiceMgr += CfgGetter.getService("PileUpMergeSvc")
 
 
 #--------------------------------------------------------------
-# Go for it
+# Subdetector-specific configuration
 #--------------------------------------------------------------
-if hasattr(runArgs,"DataRunNumber"):
-    if runArgs.DataRunNumber>0:
-        fast_chain_log.info( 'Overriding run number to be: %s ', runArgs.DataRunNumber )
-        digitizationFlags.dataRunNumber=runArgs.DataRunNumber
+#include( "Digitization/DetectorDigitization.py" )
+#########Digitization/DetectorDigitization.py
 
-print "lvl1: -14... " + str(DetFlags.digitize.LVL1_on())
+##############################################################
+#
+# Job options file to configure:
+#        Digitization
+#        LVL1 Simulation
+#        ByteStream conversion
+#
+# Author: Davide Costanzo
+# Contacts:
+#      Inner Detector:   Davide Costanzo
+#      LArCalorimeter:   Guillaume Unal
+#      TileCalorimter:   Sasha Solodkov
+#      MuonSpectrometer: Daniela Rebuzzi, Ketevi Assamagam
+#      LVL1 Simulation:  Tadashi Maeno
+#      ByteStream:       Hong Ma
+#
+#==============================================================
+#
 
-### Set digitize all except forward detectors
-DetFlags.digitize.all_setOn()
-DetFlags.digitize.LVL1_setOff()
-DetFlags.digitize.ZDC_setOff()
-DetFlags.digitize.Micromegas_setOff()
-DetFlags.digitize.sTGC_setOff()
-DetFlags.digitize.Forward_setOff()
-DetFlags.digitize.Lucid_setOff()
-DetFlags.digitize.AFP_setOff()
-DetFlags.digitize.ALFA_setOff()
+try:
+    from RecAlgs.RecAlgsConf import TimingAlg
+    topSequence+=TimingAlg("DigiTimerBegin", TimingObjOutputName = "HITStoRDO_timings")
+except:
+    fast_chain_log.warning('Could not add TimingAlg, no timing info will be written out.')
 
 
+# Set up PileupMergeSvc used by subdetectors
+#from AthenaCommon.DetFlags import DetFlags
 
+# Set up ComTimeRec for cosmics digitization
+if jobproperties.Beam.beamType == "cosmics" :
+    from CommissionRec.CommissionRecConf import ComTimeRec
+    comTimeRec = ComTimeRec("ComTimeRec")
+    topSequence += comTimeRec
 
+topSequence += CfgGetter.getAlgorithm(digitizationFlags.digiSteeringConf.get_Value(), tryDefaultConfigurable=True)
+if 'doFastPixelDigi' in digitizationFlags.experimentalDigi() or 'doFastSCT_Digi' in digitizationFlags.experimentalDigi() or 'doFastTRT_Digi' in digitizationFlags.experimentalDigi():
+    print "WARNING  Setting doFastPixelDigi ,doFastSCT_Digi or doFastTRT_Digi in digitizationFlags.experimentalDigi no longer overrides digitizationFlags.digiSteeringConf."
+elif 'doSplitDigi' in digitizationFlags.experimentalDigi():
+    print "WARNING  Setting doSplitDigi in digitizationFlags.experimentalDigi no longer overrides digitizationFlags.digiSteeringConf. Use --digiSteeringConf 'Split' on the command-line instead."
 
-from AthenaCommon.AlgSequence import AlgSequence
-topSeq = AlgSequence()
 
-## Set Overall per-Algorithm time-limit on the AlgSequence
-topSeq.TimeOut = 43200 * Units.s
+# MC Truth info
+#if DetFlags.Truth_on():
+#    include( "Digitization/TruthDigitization.py" )
 
-try:
-    from RecAlgs.RecAlgsConf import TimingAlg
-    topSeq+=TimingAlg("DigiTimerBegin", TimingObjOutputName = "HITStoRDO_timings")
-except:
-    fast_chain_log.warning('Could not add TimingAlg, no timing info will be written out.')
+# Forward Detectors
+#if DetFlags.Forward_on():
+#    include( "Digitization/FwdDetDigitization.py" )
 
-#include ("Digitization/Digitization.py")
+# Inner Detector
+if DetFlags.ID_on():
+    include( "Digitization/InDetDigitization.py" )
 
-########## Digitization.py ##########################
+# Calorimeters
+if DetFlags.Calo_on():
+    include( "Digitization/CaloDigitization.py" )
 
+# Muon Digitization
+if DetFlags.Muon_on():
+    include( "Digitization/MuonDigitization.py" )
 
+# LVL1 trigger simulation
+#if DetFlags.digitize.LVL1_on():
+include( "Digitization/LVL1Digitization.py" )
 
 
-###############################################################
-#
-# Job options file to run:
-#        Digitization
-#        LVL1 Simulation
-#        ByteStream conversion
-#
-# Author: Sven Vahsen and John Chapman
-#==============================================================
-from AthenaCommon.Logging import logging
-logDigitization_flags = logging.getLogger( 'Digitization' )
 
-#--------------------------------------------------------------
-# Get Digitization Flags (This sets Global and Det Flags)
-#--------------------------------------------------------------
-from Digitization.DigitizationFlags import digitizationFlags
-from AthenaCommon.BeamFlags import jobproperties
 
-#--------------------------------------------------------------
-# Set Global flags for this run
-#--------------------------------------------------------------
-from AthenaCommon.GlobalFlags import globalflags
-if jobproperties.Beam.beamType == "cosmics" :
-    globalflags.DetGeo = 'commis'
-#else:
-#    globalflags.DetGeo = 'atlas'
-# These should be set anyway, but just to make sure
-globalflags.DataSource = 'geant4'
-globalflags.InputFormat = 'pool'
+
+########## back to Digitization/ConfigDigitization.py
 
 #--------------------------------------------------------------
-# Set Detector flags for this run
+# Random Number Engine and Seeds
 #--------------------------------------------------------------
-if 'DetFlags' in dir():
-    logDigitization_flags.warning("DetFlags already defined! This means DetFlags should have been fully configured already..")
-    DetFlags.Print()
-else :
-    # include DetFlags
-    # by default everything is off
-    from AthenaCommon.DetFlags import DetFlags
-    DetFlags.ID_setOn()
-    DetFlags.Lucid_setOn()
-    #DetFlags.ZDC_setOn()
-    #DetFlags.ALFA_setOn()
-    #DetFlags.AFP_setOn()
-    #DetFlags.FwdRegion_setOn()
-    DetFlags.Calo_setOn()
-    if hasattr(DetFlags, 'HGTD_setOff'):
-        DetFlags.HGTD_setOff()
-    DetFlags.Muon_setOn()
-    DetFlags.Truth_setOn()
-    DetFlags.LVL1_setOn()
-
-checkOverlay = getattr(DetFlags, 'overlay', None)
-if checkOverlay is not None:
-    DetFlags.overlay.all_setOff()
-else:
-    logDigitization_flags.warning( 'DetFlags.overlay is not supported in this release' )
-DetFlags.simulate.all_setOff()
-DetFlags.makeRIO.all_setOff()
-DetFlags.writeBS.all_setOff()
-DetFlags.readRDOBS.all_setOff()
-DetFlags.readRIOBS.all_setOff()
-DetFlags.readRIOPool.all_setOff()
-DetFlags.writeRIOPool.all_setOff()
+if not athenaCommonFlags.PoolEvgenInput.statusOn:
+    if not simFlags.RandomSeedList.checkForExistingSeed('SINGLE'):
+        simFlags.RandomSeedList.addSeed( "SINGLE", 43657613, 78935670 )
+if not simFlags.RandomSeedList.checkForExistingSeed('VERTEX'):
+  simFlags.RandomSeedList.addSeed( 'VERTEX', 9123448, 829143 )
+simFlags.RandomSeedList.addtoService()
+simFlags.RandomSeedList.printSeeds()
 
-#-------------------------------------------
-# Print Job Configuration
-#-------------------------------------------
-DetFlags.Print()
-logDigitization_flags.info("Global jobProperties values:")
-globalflags.print_JobProperties()
-logDigitization_flags.info("Digitization jobProperties values:")
-digitizationFlags.print_JobProperties()
+# attach digi and pileup seeds to random number service configurable and print them out
+from AthenaCommon.ConfigurableDb import getConfigurable
+ServiceMgr += getConfigurable(digitizationFlags.rndmSvc.get_Value())()
+digitizationFlags.rndmSeedList.addtoService()
+digitizationFlags.rndmSeedList.printSeeds()
+rndmSvc = getConfigurable(digitizationFlags.rndmSvc.get_Value())()
+rndmSvc.OutputLevel = WARNING
+if digitizationFlags.readSeedsFromFile.get_Value():
+    rndmSvc.Seeds=[]
+    rndmSvc.ReadFromFile=True
+    rndmSvc.FileToRead=digitizationFlags.rndmSeedInputFile.get_Value()
+    fast_chain_log.info("Random seeds for Digitization will be read from the file %s",digitizationFlags.rndmSeedInputFile.get_Value())
+
+# write out a summary of the time spent
+from AthenaCommon.AppMgr import theAuditorSvc
+from GaudiAud.GaudiAudConf import ChronoAuditor, MemStatAuditor
+if not 'ChronoAuditor/ChronoAuditor' in theAuditorSvc.Auditors:
+    theAuditorSvc += ChronoAuditor()
+if not 'MemStatAuditor/MemStatAuditor' in theAuditorSvc.Auditors:
+    theAuditorSvc += MemStatAuditor()
+# --- load AuditorSvc
+# --- write out a short message upon entering or leaving each algorithm
+#from AthenaCommon.ConfigurableDb import getConfigurable
+# ServiceMgr.AuditorSvc += getConfigurable("NameAuditor")()
+#
+theApp.AuditAlgorithms = True
+theApp.AuditServices   = True
+#
+# --- Display detailed size and timing statistics for writing and reading
+ServiceMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True
 
-#--------------------------------------------------------------
-# Ensure AthenaCommonFlags.FilesInput is set.
-#--------------------------------------------------------------
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.FilesInput=athenaCommonFlags.PoolHitsInput.get_Value()
+# LSFTimeLimi. Temporary disable
+# include( "LSFTimeKeeper/LSFTimeKeeperOptions.py" )
 
-#--------------------------------------------------------------
-# Read Simulation MetaData (unless override flag set to True)
-#--------------------------------------------------------------
-if 'ALL' in digitizationFlags.overrideMetadata.get_Value():
-    logDigitization_flags.info("Skipping input file MetaData check.")
-else :
-    from Digitization.DigitizationReadMetaData import readHITSFileMetadata
-    readHITSFileMetadata()
+# LSFTimeKeeperSvc = Service( "LSFTimeKeeperSvc" )
+# LSFTimeKeeperSvc.OutputLevel=2; # remaining CPU at each event
 
-#--------------------------------------------------------------
-# Configure the job using jobproperties
-#--------------------------------------------------------------
-include("Digitization/ConfigDigitization.py")
-logDigitization_flags.info("Digitization Configured Successfully.")
+#### BACK TO Digitization.py ###########
+
+#
+
+#include("Digitization/ConfigDigitization.py")
+
+fast_chain_log.info("Digitization Configured Successfully.")
 
 #--------------------------------------------------------------
 # jobproperties should not be changed after this point
@@ -1404,27 +1240,27 @@ if digitizationFlags.simRunNumber.statusOn or not digitizationFlags.dataRunNumbe
 #--------------------------------------------------------------
 # Write Digitization MetaData
 #--------------------------------------------------------------
-from Digitization.DigitizationWriteMetaData import writeDigitizationMetadata
+#--------------------------------------------------------------
+# Setup the ISF Output
+#--------------------------------------------------------------
+from ISF_Example.ISF_Output import ISF_HITSStream
+from FullChainTransforms.FastChainWriteMetadata import createSimulationParametersMetadata, writeDigitizationMetadata
+createSimulationParametersMetadata()
 writeDigitizationMetadata()
 
 #--------------------------------------------------------------
 # Pool Output (Change this to use a different file)
 #--------------------------------------------------------------
 if DetFlags.writeRDOPool.any_on():
-    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
     from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
     streamRDO = AthenaPoolOutputStream("StreamRDO", athenaCommonFlags.PoolRDOOutput.get_Value(), asAlg=True)
     streamRDO.ForceRead = True
     from Digitization.DigiOutput import getStreamRDO_ItemList
-    streamRDO.ItemList = getStreamRDO_ItemList(logDigitization_flags)
+    streamRDO.ItemList = getStreamRDO_ItemList(fast_chain_log)
     streamRDO.AcceptAlgs += [ digitizationFlags.digiSteeringConf.get_Value() ]
     streamRDO.OutputFile = athenaCommonFlags.PoolRDOOutput()
-    if athenaCommonFlags.UseLZMA():
-        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_ALGORITHM = '2'" ]
-        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_LEVEL = '1'" ]
-    else:
-        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_ALGORITHM = '1'" ]
-        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_LEVEL = '4'" ]
+    ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_ALGORITHM = '2'" ]
+    ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_LEVEL = '1'" ]
     ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '1'" ]
     # Switch on splitting for the 4 largest container (default off)
     ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/PixelSDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ]
@@ -1445,26 +1281,8 @@ theApp.EvtMax = athenaCommonFlags.EvtMax()
 ServiceMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 
 
-
-
 ######## Back to MyCustomSkeleton#####################
 
-
-
-
-
-
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-if hasattr(runArgs,"AMITag"):
-    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag ]
-
-### No RDO output to increase file size of
-# Increase max RDO output file size to 10 GB
-
-#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-#svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ] #[ "15000000000" ] #Athena complains that 15GB files are not supported
-
 ## Post-include
 if hasattr(runArgs,"postInclude"):
     for fragment in runArgs.postInclude:
@@ -1478,6 +1296,6 @@ if hasattr(runArgs,"postExec"):
         exec(cmd)
 
 ### End of Digi
- 
+
 #from AthenaCommon.ConfigurationShelve import saveToAscii
 #saveToAscii('config.txt')