From 013b7d2fdbbf219736d88e2a7ad2471a6971671a Mon Sep 17 00:00:00 2001
From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch>
Date: Mon, 30 Oct 2017 19:15:28 +0000
Subject: [PATCH] Merge branch 'rtt-fix-addMT' into '21.0'

update data mc tests and add new AthenaMT tests

See merge request !5673

Former-commit-id: d3f90fd364e70c733f657f9cbd384499294ab133
---
 .../RecJobTransformTests_CaloHiveExOpts.py    | 174 ++++++++++++++
 ...bTransformTests_MuonRec_myTopOptions_MT.py | 132 ++++++++++
 .../RecJobTransformTests_PFlowHiveDeps.py     |  27 +++
 .../RecJobTransformTests_PFlowHiveExOpts.py   | 225 ++++++++++++++++++
 ...RecJobTransformTests_TestConfiguration.xml |  45 +++-
 5 files changed, 597 insertions(+), 6 deletions(-)
 create mode 100644 Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
 create mode 100644 Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
 create mode 100644 Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveDeps.py
 create mode 100644 Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py

diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
new file mode 100644
index 00000000000..1d95d74751e
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_CaloHiveExOpts.py
@@ -0,0 +1,174 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+from AthenaCommon.AlgSequence import AthSequencer 
+condSeq = AthSequencer("AthCondSeq") 
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+# Get number of processes and threads
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+nProc = jp.ConcurrencyFlags.NumProcs()
+
+if nThreads >=1 :
+   from AthenaCommon.AlgScheduler import AlgScheduler
+   AlgScheduler.OutputLevel( INFO )
+   AlgScheduler.ShowControlFlow( True )
+   AlgScheduler.ShowDataDependencies( True )
+   AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+   # Support for the MT-MP hybrid mode
+   if (nProc > 0) :
+
+      from AthenaCommon.Logging import log as msg
+      if (theApp.EvtMax == -1) : 
+         msg.fatal('EvtMax must be >0 for hybrid configuration')
+         sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
+
+         if ( theApp.EvtMax % nProc != 0 ) :
+            msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
+
+         chunkSize = int (theApp.EvtMax / nProc)
+
+         from AthenaMP.AthenaMPFlags import jobproperties as jps 
+         jps.AthenaMPFlags.ChunkSize= chunkSize
+         
+         msg.info('AthenaMP workers will process %s events each',chunkSize)
+
+   ## force loading of data. make sure this alg is at the front of the
+   ## AlgSequence
+   #
+   from SGComps.SGCompsConf import SGInputLoader
+   topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
+
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+theApp.EvtMax = 300
+
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+topSequence+=xAODMaker__EventInfoCnvAlg()
+
+# Configure MT Condition Data Access
+from IOVDbSvc.CondDB import conddb
+
+# Make sure PerfMon is off
+include( "PerfMonGPerfTools/DisablePerfMon_jobOFragment.py" )
+
+# Input file
+dataFile = "/afs/cern.ch/atlas/project/rig/referencefiles/MC/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.e3099_s2578/RDO.04919495._000958.pool.root.1"
+
+from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+athenaCommonFlags.FilesInput=[dataFile,dataFile]
+
+# AutoConfiguration
+from RecExConfig.RecFlags import rec
+rec.AutoConfiguration = ['everything']
+import RecExConfig.AutoConfiguration as auto
+auto.ConfigureFromListOfKeys(rec.AutoConfiguration())
+
+from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
+from RecExConfig.InputFilePeeker import inputFileSummary
+objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList'])
+
+#---------------------------------------------------------------------------------#
+# Detector Description
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+
+from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
+from TileGeoModel.TileGeoModelConf import TileDetectorTool
+
+ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
+                                          TileDetectorTool(GeometryConfig = "RECO")
+                                          ]
+
+
+from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
+
+include( "TileConditions/TileConditions_jobOptions.py" )
+
+include( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py")
+include( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py")
+
+include( "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py" )
+include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
+from LArConditionsCommon import LArAlignable
+ServiceMgr.DetDescrCnvSvc.DecodeIdDict = True
+# Detector Description
+#---------------------------------------------------------------------------------#
+
+import AthenaPoolCnvSvc.ReadAthenaPool  #Maybe better to break up to get rid of MetaData stuff
+
+svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
+
+from GaudiAlg.GaudiAlgConf import EventCounter
+topSequence+=EventCounter(Frequency=2)
+
+from LArROD.LArRODFlags import larRODFlags
+larRODFlags.readDigits=False
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.clusterCellGetterName = 'CaloRec.CaloCellGetter.CaloCellGetter'
+
+from CaloRec.CaloCellFlags import jobproperties
+jobproperties.CaloCellFlags.doLArDeadOTXCorr=False
+
+from CaloRec.CaloCellGetter import CaloCellGetter
+CaloCellGetter()
+
+from CaloRec.CaloClusterSWCmbGetter import CaloClusterSWCmbGetter
+CaloClusterSWCmbGetter()
+
+include( "CaloRec/CaloTopoCluster_jobOptions.py" )
+
+import AthenaPoolCnvSvc.WriteAthenaPool
+logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' )
+from OutputStreamAthenaPool.OutputStreamAthenaPool import  createOutputStream
+
+StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
+include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
+StreamESD.ItemList+=CaloESDList
+
+print StreamESD.ItemList
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+if nThreads >=1 :
+   include ( "CaloHiveEx/CaloHiveDeps.py" )
+
+print "==========================================================================================\n"
+
+#
+## set which Algorithms can be cloned
+#
+# names of algs are:
+#  SGInputLoader
+#  xAODMaker::EventInfoCnvAlg
+#  EventCounter
+#  CaloCellMaker
+#  CmbTowerBldr
+#  CaloClusterMakerSWCmb
+#  CaloTopoCluster
+#  StreamESD
+
+#  set algCardinality = 1 to disable cloning for all Algs
+algCardinality = nThreads
+
+if (algCardinality > 1):   
+   for alg in topSequence:      
+      name = alg.name()
+      if name in ["CaloCellMaker","StreamESD"] :
+         # suppress INFO message about Alg unclonability
+         alg.Cardinality = 1
+      else:
+         alg.Cardinality = algCardinality
+           
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
new file mode 100644
index 00000000000..f2bf473e496
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py
@@ -0,0 +1,132 @@
+from MuonRecExample.MuonRecFlags import muonRecFlags
+from RecExConfig.RecFlags import rec
+from RecExConfig.RecAlgsFlags import recAlgs
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+
+## flag to set number of events to be processed
+EvtMax = 300
+
+## flag for running in mig5
+doMig5 = False
+
+# in Standalone mode, don't allow any configuration errors
+athenaCommonFlags.AllowIgnoreConfigError = False
+
+# configure flags so that only Muon Standalone reco is run
+import MuonRecExample.MuonRecStandaloneOnlySetup
+
+#import MuonCombinedRecExample.MuonCombinedRecOnlySetup 
+from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
+
+from MuonRecExample import MuonRecUtils
+from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet
+#--------------------------------------------------------------------------------
+# Input
+#--------------------------------------------------------------------------------
+athenaCommonFlags.FilesInput = [
+"/afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/MC15_13TeV/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r6699_10evt.pool.root"
+]
+
+if not hasJobPropertyBeenSet(athenaCommonFlags.FilesInput):
+    athenaCommonFlags.FilesInput = MuonRecUtils.FileList.readDirectory("root://castoratlas//castor/cern.ch/atlas/atlascerngroupdisk/det-muon/ReferenceDatasets/Digitization/Zmumu_15616/")
+#    assertCastorStager("castoratlast3","atlascerngroupdisk")
+#    athenaCommonFlags.FilesInput = MuonRecUtils.FileList.readDirectory("rfio:/castor/cern.ch/atlas/atlascerngroupdisk/det-muon/ReferenceDatasets/Digitization/Zmumu_15616/")
+
+#--------------------------------------------------------------------------------
+# Output
+#--------------------------------------------------------------------------------
+#rec.doPerfMon = True
+#rec.doDetailedAuditor = True
+rec.doWriteESD = True
+muonRecFlags.doCalibNtuple = False # write calibration ntuple?
+#muonRecFlags.calibNtupleSegments = False # write segments to ntuple?
+#muonRecFlags.calibNtupleTracks = False # write tracks to ntuple?
+#muonRecFlags.calibNtupleTrigger = False # write trigger info to ntuple?
+###
+
+rec.doNameAuditor = True
+#muonRecFlags.doVP1 = True    # Decide whether to run Virtual Point1 graphical event display
+rec.doTruth=True
+
+#rec.doTrigger = True
+
+# Read geometry alignment corrections from DB
+#muonRecFlags.useAlignmentCorrections = True
+rec.doTrigger = False
+#recFlags.doTruth.set_Value_and_Lock(False)
+muonRecFlags.doStandalone.set_Value_and_Lock(True)
+# Read geometry alignment corrections from DB
+#muonRecFlags.useAlignmentCorrections = True
+muonRecFlags.doTrackPerformance    = True
+muonRecFlags.TrackPerfSummaryLevel = 2
+muonRecFlags.TrackPerfDebugLevel   = 5
+muonRecFlags.doCSCs                = True
+muonRecFlags.doNSWNewThirdChain    = False
+
+# flags to tweak standalone muon reconstruction
+if doMig5:
+    muonStandaloneFlags.doSegmentsOnly       = False
+    muonStandaloneFlags.patternsOnly         = False
+    muonStandaloneFlags.createTrackParticles = False
+
+#muonStandaloneFlags.printSummary         = True
+muonCombinedRecFlags.doTrackPerformance  = True
+muonCombinedRecFlags.doMuGirl            = True
+muonCombinedRecFlags.printSummary        = True
+
+
+##### no more flags after this line #####
+try:
+    include("MuonRecExample/MuonRec_topOptions.py")
+   
+    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+    from AthenaCommon.AlgScheduler import AlgScheduler
+    AlgScheduler.CheckDependencies( True )
+    AlgScheduler.ShowControlFlow( True )
+    AlgScheduler.ShowDataDependencies( True )
+    AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+    from SGComps.SGCompsConf import SGInputLoader
+    topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
+    # topSequence.SGInputLoader.Load = [ ('MdtCsmContainer','MDTCSM'), ('RpcPadContainer','RPCPAD'), ('TgcRdoContainer','TGCRDO'), ('CscRawDataContainer','CSCRDO')]
+    ###### put any user finetuning after this line #####
+
+    #from MuonTestEDM.MuonTestEDMConf import MuonTestEDM
+    #MyEDMTester = MuonTestEDM(DoDumpPRDs=True, DoDumpTracks=False, DoDumpRDOs=True, DoDumpSegments=False)
+    #topSequence += MyEDMTester
+        
+    #if not 'DumpFileName' in dir():
+    #  DumpFileName="ReadBS"
+    
+    #MyEDMTester.RdoDumpFileName    = DumpFileName+".rdo.log"
+    #MyEDMTester.PrdDumpFileName    = DumpFileName+".prd.log"
+    #MyEDMTester.TrackDumpFileName  = DumpFileName+".track.log"
+    #MyEDMTester.TrackParticleDumpFileName  = DumpFileName+".trackParticle.log"
+    #MyEDMTester.SegmentDumpFileName= DumpFileName+".segment.log"
+    #MyEDMTester.SummaryDumpFileName= DumpFileName+".summary.log" 
+
+    ###### put any user finetuning before this line #####
+
+##### DO NOT ADD ANYTHING AFTER THIS LINE #####
+except:
+    # print the stacktrace (saving could fail, and would then obscure the real problem)
+    import traceback
+    print traceback.format_exc().rstrip()
+    
+    # always write config so far for debugging
+    from AthenaCommon.ConfigurationShelve import saveToAscii
+    saveToAscii("config.txt")
+    # add DetFlags
+    from MuonRecExample.MuonRecUtils import dumpDetFlags
+    dumpDetFlags("config.txt")
+    # but still exit with error
+    import sys
+    sys.exit(10)
+else:
+    # and write config to include user changes after topOptions
+    from AthenaCommon.ConfigurationShelve import saveToAscii
+    saveToAscii("config.txt")
+    # add DetFlags
+    from MuonRecExample.MuonRecUtils import dumpDetFlags
+    dumpDetFlags("config.txt")
+
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveDeps.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveDeps.py
new file mode 100644
index 00000000000..1b17090c2aa
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveDeps.py
@@ -0,0 +1,27 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+#
+## Based on CaloHiveDeps.py: Algorithm Data Dependencies for CaloBottoUp.py
+## With small adjustments to make it work on ESD files
+
+xAODMaker__EventInfoCnvAlg.ExtraInputs =  [('EventInfo','McEventInfo')]
+xAODMaker__EventInfoCnvAlg.ExtraOutputs = [('xAOD::EventAuxInfo','EventInfoAux.'),
+                                           ('xAOD::EventInfo','EventInfo') ]
+
+topSequence.CaloTopoCluster.ExtraInputs =  [('CaloCalibrationHitContainer','LArCalibrationHitActive'),
+                                            ('CaloCalibrationHitContainer','LArCalibrationHitDeadMaterial'),
+                                            ('CaloCalibrationHitContainer','LArCalibrationHitInactive'),
+                                            ('CaloCellContainer','AllCalo')]
+topSequence.CaloTopoCluster.ExtraOutputs = [('xAOD::CaloClusterContainer','CaloCalTopoClusters'),
+                                            ('xAOD::CaloClusterAuxContainer','CaloCalTopoClustersAux.'),
+                                            ('xAOD::CaloClusterContainer','CaloTopoCluster'),
+                                            ('xAOD::CaloClusterAuxContainer','CaloTopoClusterAux.'),
+                                            ('CaloClusterCellLinkContainer','CaloTopoCluster_links'),
+                                            ('CaloClusterCellLinkContainer','CaloCalTopoClusters_links')]
+
+
+StreamESD.ExtraInputs = [('CaloCellContainer','AllCalo'),
+                         ('xAOD::CaloClusterContainer','CaloTopoCluster')]
+
diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py
new file mode 100644
index 00000000000..1e0f8886b62
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_PFlowHiveExOpts.py
@@ -0,0 +1,225 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+# Runs calorimeter clustering reconstruction - this part is taken from CaloHiveExOpts.py
+# Additional configuration runs particle flow MT algorithms and sets up items needed for track to calorimeter extrapolation
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+import MagFieldServices.SetupField
+
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetGeo = 'atlas'
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.all_setOff()
+DetFlags.detdescr.Muon_setOn()
+if hasattr(DetFlags,'BField_on'): DetFlags.BField_setOn()
+from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
+AtlasTrackingGeometrySvc  = svcMgr.AtlasTrackingGeometrySvc
+include('RecExCond/AllDet_detDescr.py')
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+# Get number of processes and threads
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+nProc = jp.ConcurrencyFlags.NumProcs()
+
+if nThreads >=1 :
+   from AthenaCommon.AlgScheduler import AlgScheduler
+   AlgScheduler.OutputLevel( INFO )
+   AlgScheduler.ShowControlFlow( True )
+   AlgScheduler.ShowDataDependencies( True )
+   AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+   # Support for the MT-MP hybrid mode
+   if (nProc > 0) :
+
+      from AthenaCommon.Logging import log as msg
+      if (theApp.EvtMax == -1) : 
+         msg.fatal('EvtMax must be >0 for hybrid configuration')
+         sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
+
+         if ( theApp.EvtMax % nProc != 0 ) :
+            msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
+
+         chunkSize = int (theApp.EvtMax / nProc)
+
+         from AthenaMP.AthenaMPFlags import jobproperties as jps 
+         jps.AthenaMPFlags.ChunkSize= chunkSize
+         
+         msg.info('AthenaMP workers will process %s events each',chunkSize)
+
+   ## force loading of data. make sure this alg is at the front of the
+   ## AlgSequence
+   #
+   from SGComps.SGCompsConf import SGInputLoader
+   topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
+
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+theApp.EvtMax = 300
+
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+topSequence+=xAODMaker__EventInfoCnvAlg()
+
+#---------------------------------------------------------------------------------#
+# NEW Conditions access infrastructure
+#
+from IOVSvc.IOVSvcConf import CondInputLoader
+topSequence += CondInputLoader( "CondInputLoader", OutputLevel=DEBUG,  )
+
+import StoreGate.StoreGateConf as StoreGateConf
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
+
+from IOVSvc.IOVSvcConf import CondSvc
+svcMgr += CondSvc()
+# NEW Conditions access infrastructure
+#---------------------------------------------------------------------------------#
+
+# Make sure PerfMon is off
+include( "PerfMonGPerfTools/DisablePerfMon_jobOFragment.py" )
+
+# Input file
+dataFile="/eos/atlas/atlascerngroupdisk/phys-rig/MC15Samples/ESD/mc15_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s2832_r7968/ESD.08355655._001904.pool.root.1"
+
+from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+athenaCommonFlags.FilesInput=[dataFile,dataFile]
+
+# AutoConfiguration
+from RecExConfig.RecFlags import rec
+rec.AutoConfiguration = ['everything']
+import RecExConfig.AutoConfiguration as auto
+auto.ConfigureFromListOfKeys(rec.AutoConfiguration())
+
+from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
+from RecExConfig.InputFilePeeker import inputFileSummary
+objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList'])
+
+#---------------------------------------------------------------------------------#
+# Detector Description
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+
+from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
+from TileGeoModel.TileGeoModelConf import TileDetectorTool
+
+ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
+                                          TileDetectorTool(GeometryConfig = "RECO")
+                                          ]
+
+
+from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
+
+include( "TileConditions/TileConditions_jobOptions.py" )
+
+include( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py")
+include( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py")
+
+include( "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py" )
+include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
+from LArConditionsCommon import LArAlignable
+ServiceMgr.DetDescrCnvSvc.DecodeIdDict = True
+# Detector Description
+#---------------------------------------------------------------------------------#
+
+import AthenaPoolCnvSvc.ReadAthenaPool  #Maybe better to break up to get rid of MetaData stuff
+
+svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
+
+from GaudiAlg.GaudiAlgConf import EventCounter
+topSequence+=EventCounter(Frequency=2)
+
+from LArROD.LArRODFlags import larRODFlags
+larRODFlags.readDigits=False
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.clusterCellGetterName = 'CaloRec.CaloCellGetter.CaloCellGetter'
+
+from CaloRec.CaloCellFlags import jobproperties
+jobproperties.CaloCellFlags.doLArDeadOTXCorr=False
+
+include( "CaloRec/CaloTopoCluster_jobOptions.py" )
+
+#PFlow
+
+from eflowRec.eflowRecConf import PFLeptonSelector
+PFLeptonSelector=PFLeptonSelector("PFLeptonSelector")
+topSequence += PFLeptonSelector
+
+from eflowRec.eflowRecConf import PFTrackSelector
+PFTrackSelector=PFTrackSelector("PFTrackSelector")
+
+from eflowRec.eflowRecConf import eflowTrackCaloDummyExtensionTool
+TrackCaloExtensionTool=eflowTrackCaloDummyExtensionTool()
+
+PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
+
+from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
+TrackSelectionTool = InDet__InDetTrackSelectionTool()
+
+from AthenaCommon.AppMgr import ToolSvc
+ToolSvc += TrackSelectionTool
+
+TrackSelectionTool.CutLevel = "TightPrimary"
+TrackSelectionTool.minPt = 500.0 
+
+PFTrackSelector.trackSelectionTool = TrackSelectionTool
+
+topSequence += PFTrackSelector
+
+from eflowRec.eflowRecConf import PFClusterSelector
+PFClusterSelector=PFClusterSelector("PFClusterSelector")
+
+topSequence += PFClusterSelector
+
+import AthenaPoolCnvSvc.WriteAthenaPool
+logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' )
+from OutputStreamAthenaPool.OutputStreamAthenaPool import  createOutputStream
+
+StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
+include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
+StreamESD.ItemList+=CaloESDList
+
+print StreamESD.ItemList
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+if nThreads >=1 :
+   include ( "RecJobTransformTests_PFlowHiveDeps.py" )
+
+print "==========================================================================================\n"
+
+#
+## set which Algorithms can be cloned
+#
+# names of algs are:
+#  SGInputLoader
+#  xAODMaker::EventInfoCnvAlg
+#  EventCounter
+#  CaloCellMaker
+#  CmbTowerBldr
+#  CaloClusterMakerSWCmb
+#  CaloTopoCluster
+#  StreamESD
+
+#  set algCardinality = 1 to disable cloning for all Algs
+algCardinality = nThreads
+
+if (algCardinality > 1):   
+   for alg in topSequence:      
+      name = alg.name()
+      if name in ["CaloCellMaker","StreamESD"] :
+         # suppress INFO message about Alg unclonability
+         alg.Cardinality = 1
+      else:
+         alg.Cardinality = algCardinality
+
+#Change input and output container names
+topSequence.CaloTopoCluster.ClustersOutputName="CaloCalTopoClusterV2"
+topSequence.PFClusterSelector.calClustersName="CaloCalTopoClusterV2"
+           
+
+
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml b/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
index 2a91c414a82..325bd297faa 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/RecJobTransformTests_TestConfiguration.xml
@@ -311,11 +311,12 @@
                     <chainElement>
                         <jobTransform userJobId="PhysVal_MC15_13TeV_All">
 						<!-- add preExec and remove doTopoCluster ATLJETMET-774 -->
+						<!-- add preExec to find the missing InDetPhysValFlags -->
 						<!-- no plan yet to move to MC16 July 2017-->
                             <doc>Reco_tf runs physcs validation as defined by Carl G/Marie-Helene G, May 7 2014</doc>
                             <jobTransformJobName>PhysVal_MC15_trf</jobTransformJobName>
                             <jobTransformCmd>
-                                Reco_tf.py --maxEvents=1 --inputAODFile AOD_13TeV_PhysVal.pool.root --outputNTUP_PHYSVALFile PhysVal_13TeV_All.pool.root --validationFlags doExample doPFlow doJet doMET doMuon doTau doEgamma doBtag doInDet doZee --preExec "all:from InDetPhysValMonitoring.addTruthJets import addTruthJetsIfNotExising; addTruthJetsIfNotExising(\"AntiKt4TruthJets\");"
+                                Reco_tf.py --maxEvents=-1 --inputAODFile AOD_13TeV_PhysVal.pool.root --outputNTUP_PHYSVALFile PhysVal_13TeV_All.pool.root --validationFlags doExample doPFlow doJet doMET doMuon doTau doEgamma doBtag doInDet doZee --preExec "all:from InDetPhysValMonitoring.addTruthJets import addTruthJetsIfNotExising; addTruthJetsIfNotExising(\"AntiKt4TruthJets\");from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True);"
                             </jobTransformCmd>
                             <group>RecTrf</group>
                             <chaindataset_info>
@@ -348,7 +349,7 @@
                 <doc>RDO to BS on tt mc16 </doc>
                 <jobTransformJobName>RecoTf_RDOtoBS</jobTransformJobName>
                 <jobTransformCmd>
-				Reco_tf.py --inputRDOFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --outputBSFile mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.data --autoConfiguration everything --maxEvents -1 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501
+				Reco_tf.py --inputRDOFile /eos/atlas/atlascerngroupdisk/phys-rig/MC16Samples/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --outputBSFile mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.data --autoConfiguration everything --maxEvents 300 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501
                 </jobTransformCmd>
                 <group>RecTrf</group>
                 <queue>medium</queue>
@@ -419,33 +420,35 @@
                 <queue>long</queue>
             </jobTransform>
 
+            <!-- tmp solution manually remove the failing class in finalization ATLASSIM-3277 -->
             <jobTransform userJobId="data17_13TeV">
                 <doc>Reco_tf runs on 13TeV collision data 2017, early data, A3, Toroid and solenoid off</doc>
                 <jobTransformJobName>RecoTf_13TeV_data_2017</jobTransformJobName>
                 <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False;' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
+				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --postExec 'from AthenaCommon.AlgSequence import AlgSequence;topSeq = AlgSequence();topSeq.remove("topSeq.InDetAmbiguitySolver")' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
                 </jobTransformCmd>
                 <group>RecTrf</group>
                 <queue>long</queue>
             </jobTransform>
 
             <!-- Test runs on 13TeV collision data with Hephaestos -->
-      
+            <!-- tmp solution manually remove the failing class in finalization ATLASSIM-3277 -->
             <jobTransform userJobId="data17_13TeV_memleak">
                 <doc>Reco_tf runs on 13TeV collision data with Hephaestos for checking for memory leaks 2017</doc>
                 <jobTransformJobName>RecoTf_13TeV_data</jobTransformJobName>
                 <jobTransformCmd>
-				export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 10 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --athenaopts '--stdcmalloc --leak-check-execute'
+				export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 10 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --athenaopts '--stdcmalloc --leak-check-execute' --postExec 'from AthenaCommon.AlgSequence import AlgSequence;topSeq = AlgSequence();topSeq.remove("topSeq.InDetAmbiguitySolver")'
                 </jobTransformCmd>
                 <group>RecTrf</group>
                 <queue>long</queue>
             </jobTransform>
       
+	        <!-- tmp solution manually remove the failing class in finalization ATLASSIM-3277 -->
             <jobTransform userJobId="data17_13TeV_fpe">
                 <doc>Reco_tf runs on 13TeV collision data with floating point exception enabled 2017</doc>
                 <jobTransformJobName>RecoTf_13TeV_data_fpe</jobTransformJobName>
                 <jobTransformCmd>
-				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents -1 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doFloatingPointException=True;rec.doTrigger=False;' --postExec 'FPEAuditor.NStacktracesOnFPE=5' 
+				Reco_tf.py --inputBSFile /eos/atlas/atlascerngroupdisk/phys-rig/data17_13TeV.00324910.physics_Main.daq.RAW/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents -1 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doFloatingPointException=True;rec.doTrigger=False;' --postExec 'FPEAuditor.NStacktracesOnFPE=5;from AthenaCommon.AlgSequence import AlgSequence;topSeq = AlgSequence();topSeq.remove("topSeq.InDetAmbiguitySolver")'
                 </jobTransformCmd>
                 <group>RecTrf</group>
                 <queue>long</queue>
@@ -518,6 +521,36 @@
                 <queue>medium</queue>
             </jobTransform>
       
+            <jobTransform userJobId="AthenaMT_CaloReco">
+                <doc>AthenaMT test</doc>
+                <jobTransformJobName>AthenaMT_CaloReco</jobTransformJobName>
+                <jobTransformCmd>
+				athena --threads=8 RecJobTransformTests_CaloHiveExOpts.py
+                </jobTransformCmd>
+                <group>RecTrf</group>
+                <queue>medium</queue>
+            </jobTransform>
+
+            <jobTransform userJobId="AthenaMT_PFCaloReco">
+                <doc>AthenaMT test</doc>
+                <jobTransformJobName>AthenaMT_PFCaloReco</jobTransformJobName>
+                <jobTransformCmd>
+				athena --threads=8 RecJobTransformTests_PFlowHiveExOpts.py
+                </jobTransformCmd>
+                <group>RecTrf</group>
+                <queue>medium</queue>
+            </jobTransform>
+
+            <jobTransform userJobId="AthenaMT_MuonReco">
+                <doc>AthenaMT test</doc>
+                <jobTransformJobName>AthenaMT_MuonReco</jobTransformJobName>
+                <jobTransformCmd>
+				athena --threads=8 RecJobTransformTests_MuonRec_myTopOptions_MT.py
+                </jobTransformCmd>
+                <group>RecTrf</group>
+                <queue>medium</queue>
+            </jobTransform>
+
         </jobList>
     
         <jobGroups>
-- 
GitLab