Commit 25138896 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'ReSimulation_CA_master' into 'master'

ComponentAccumulator-based configuration for the ReSimulation Workflow

See merge request atlas/athena!46575
parents 530f44d3 3f62dc3c
......@@ -54,6 +54,7 @@ from ISF_Geant4CommonTools.ISF_Geant4CommonToolsConfigNew import (
AFIIEntryLayerToolMTCfg
)
from ISF_FatrasServices.ISF_FatrasConfig import fatrasTransportToolCfg
AthSequencer=CompFactory.AthSequencer
# MT
def Kernel_GenericSimulatorMTCfg(flags, name="ISF_Kernel_GenericSimulatorMT", **kwargs):
......@@ -90,7 +91,11 @@ def Kernel_GenericSimulatorMTCfg(flags, name="ISF_Kernel_GenericSimulatorMT", **
#Write MetaData container
from G4AtlasApps.G4Atlas_MetadataNew import writeSimulationParametersMetadata
acc.merge(writeSimulationParametersMetadata(flags))
acc.addEventAlgo(CompFactory.ISF.SimKernelMT(name, **kwargs))
if flags.Sim.ISF.ReSimulation:
acc.addSequence(AthSequencer('SimSequence'), parentName='AthAlgSeq') # TODO make the name configurable?
acc.addEventAlgo(CompFactory.ISF.SimKernelMT(name, **kwargs), 'SimSequence') # TODO make the name configurable?
else:
acc.addEventAlgo(CompFactory.ISF.SimKernelMT(name, **kwargs))
return acc
......@@ -362,7 +367,11 @@ def Kernel_GenericSimulatorCfg(flags, name="ISF_Kernel_GenericSimulator", **kwar
kwargs.setdefault("DoCPUMonitoring", flags.Sim.ISF.DoTimeMonitoring)
kwargs.setdefault("DoMemoryMonitoring", flags.Sim.ISF.DoMemoryMonitoring)
acc.addEventAlgo(CompFactory.ISF.SimKernel(name, **kwargs))
if flags.Sim.ISF.ReSimulation:
acc.addSequence(AthSequencer('SimSequence'), parentName='AthAlgSeq') # TODO make the name configurable?
acc.addEventAlgo(CompFactory.ISF.SimKernel(name, **kwargs), 'SimSequence') # TODO make the name configurable?
else:
acc.addEventAlgo(CompFactory.ISF.SimKernel(name, **kwargs))
return acc
def Kernel_ATLFASTIIF_G4MSCfg(flags, name="ISF_Kernel_ATLFASTIIF_G4MS", **kwargs):
......
......@@ -3,10 +3,12 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from ISF_HepMC_Tools import ParticleSimWhiteList_ExtraParticlesCfg, ParticleFinalStateFilterCfg, GenParticleInteractingFilterCfg, EtaPhiFilterCfg, ParticlePositionFilterDynamicCfg
from ISF_HepMC_Tools.ISF_HepMC_ToolsConfigNew import ParticleSimWhiteList_ExtraParticlesCfg, ParticleFinalStateFilterCfg, GenParticleInteractingFilterCfg, EtaPhiFilterCfg, ParticlePositionFilterDynamicCfg
AthSequencer=CompFactory.AthSequencer
def SimEventFilterCfg(flags, name="ISF_SimEventFilter", sequenceName='SimSequence', **kwargs):
result = ComponentAccumulator()
result.addSequence(AthSequencer(sequenceName), parentName='AthAlgSeq')
kwargs.setdefault( "InputHardScatterCollection", "BeamTruthEvent")
kwargs.setdefault( "GenParticleCommonFilters", [result.popToolsAndMerge(ParticlePositionFilterDynamicCfg(flags)),
result.popToolsAndMerge(EtaPhiFilterCfg(flags)),
......@@ -24,6 +26,7 @@ def InvertedSimEventFilterCfg(flags, name="ISF_InvertedSimEventFilter", sequence
def RenameHitCollectionsCfg(flags, name="RenameHitCollections", sequenceName='CopyHitSequence', **kwargs):
result = ComponentAccumulator()
result.addSequence(AthSequencer(sequenceName), parentName='AthAlgSeq')
kwargs.setdefault( "InputMcEventCollection", "TruthEventOLD" )
kwargs.setdefault( "OutputMcEventCollection", "TruthEvent" )
kwargs.setdefault( "InputCaloEntryLayer", "CaloEntryLayerOLD" )
......
......@@ -15,6 +15,8 @@
# 4) inputHITSFile (re-simulation)
from PyJobTransforms.TransformUtils import executeFromFragment
from AthenaConfiguration.ComponentFactory import CompFactory
AthSequencer=CompFactory.AthSequencer
def specialConfigPreInclude(ConfigFlags):
......@@ -55,22 +57,40 @@ def CommonSimulationCfg(ConfigFlags, log):
# Cases 2a, 2b, 2c
from TrackRecordGenerator.TrackRecordGeneratorConfigNew import Input_TrackRecordGeneratorCfg
cfg.merge(Input_TrackRecordGeneratorCfg(ConfigFlags))
if ConfigFlags.Sim.ISF.ReSimulation:
# Case 4
from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
cfg.merge(EventInfoCnvAlgCfg(ConfigFlags))
from McEventCollectionFilter.McEventCollectionFilterConfig import TruthResetAlgCfg
cfg.merge(TruthResetAlgCfg(ConfigFlags))
cfg.addSequence(AthSequencer('SimSequence'), parentName='AthAlgSeq')
cfg.addSequence(AthSequencer('CopyHitSequence'), parentName='AthAlgSeq')
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
cfg.merge(PoolWriteCfg(ConfigFlags))
# add BeamEffectsAlg
from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
cfg.merge(BeamEffectsAlgCfg(ConfigFlags))
if ConfigFlags.Sim.ISF.ReSimulation:
# Case 4
from ISF_Algorithms.ISF_AlgorithmsConfigNew import SimEventFilterCfg, InvertedSimEventFilterCfg, RenameHitCollectionsCfg
cfg.merge(SimEventFilterCfg(ConfigFlags, sequenceName='SimSequence'))
cfg.merge(InvertedSimEventFilterCfg(ConfigFlags, sequenceName='CopyHitSequence'))
cfg.merge(RenameHitCollectionsCfg(ConfigFlags, sequenceName='CopyHitSequence'))
else:
#Cases 1, 2, 3
# add BeamEffectsAlg
from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
cfg.merge(BeamEffectsAlgCfg(ConfigFlags))
AcceptAlgName=''
AcceptAlgNames=[]
if ConfigFlags.Sim.ISFRun:
# add the ISF_MainConfig
# add the ISF_MainConfig
from ISF_Config.ISF_MainConfigNew import ISF_KernelCfg
cfg.merge(ISF_KernelCfg(ConfigFlags))
AcceptAlgName = 'ISF_Kernel_' + ConfigFlags.Sim.ISF.Simulator
AcceptAlgNames = ['ISF_Kernel_' + ConfigFlags.Sim.ISF.Simulator]
if ConfigFlags.Sim.ISF.ReSimulation:
AcceptAlgNames += ['RenameHitCollections']
else:
AcceptAlgName = 'G4AtlasAlg'
AcceptAlgNames = ['G4AtlasAlg']
#add the G4AtlasAlg
from G4AtlasAlg.G4AtlasAlgConfigNew import G4AtlasAlgCfg
cfg.merge(G4AtlasAlgCfg(ConfigFlags))
......@@ -78,11 +98,13 @@ def CommonSimulationCfg(ConfigFlags, log):
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
from SimuJobTransforms.SimOutputConfig import getStreamHITS_ItemList
cfg.merge( OutputStreamCfg(ConfigFlags,"HITS", ItemList=getStreamHITS_ItemList(ConfigFlags), disableEventTag=True) )
cfg.getEventAlgo("OutputStreamHITS").AcceptAlgs=[AcceptAlgName]
cfg.getEventAlgo("OutputStreamHITS").AcceptAlgs=AcceptAlgNames
if ConfigFlags.Sim.ISF.ReSimulation:
cfg.getEventAlgo("OutputStreamHITS").TakeItemsFromInput=False
if len(ConfigFlags.Output.EVNT_TRFileName)>0:
from SimuJobTransforms.SimOutputConfig import getStreamEVNT_TR_ItemList
cfg.merge( OutputStreamCfg(ConfigFlags,"EVNT_TR", ItemList=getStreamEVNT_TR_ItemList(ConfigFlags), disableEventTag=True) )
cfg.getEventAlgo("OutputStreamEVNT_TR").AcceptAlgs=[AcceptAlgName]
cfg.getEventAlgo("OutputStreamEVNT_TR").AcceptAlgs=AcceptAlgNames
return cfg
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
def RenameHitCollectionsOnReadCfg(ConfigFlags):
result = ComponentAccumulator()
from SGComps.AddressRemappingConfig import InputRenameCfg
result.merge(InputRenameCfg("McEventCollection","TruthEvent","TruthEventOLD"))
result.merge(InputRenameCfg("RecoTimingObj","EVNTtoHITS_timings","EVNTtoHITS_timingsOLD"))
if ConfigFlags.Detector.EnableID or ConfigFlags.Detector.EnableITk:
if ConfigFlags.Detector.EnableBCM:
result.merge(InputRenameCfg("SiHitCollection","BCMHits","BCMHitsOLD"))
result.merge(InputRenameCfg("SiHitCollection","BLMHits","BLMHitsOLD"))
if ConfigFlags.Detector.EnablePixel:
result.merge(InputRenameCfg("SiHitCollection","PixelHits","PixelHitsOLD"))
if ConfigFlags.Detector.EnableSCT:
result.merge(InputRenameCfg("SiHitCollection","SCT_Hits","SCT_HitsOLD"))
if ConfigFlags.Detector.EnableTRT:
result.merge(InputRenameCfg("TRTUncompressedHitCollection","TRTUncompressedHits","TRTUncompressedHitsOLD"))
if ConfigFlags.Detector.EnableBCMPrime:
pass #TODO
if ConfigFlags.Detector.EnableITkPixel:
result.merge(InputRenameCfg("SiHitCollection","ITkPixelHits","ITkPixelHitsOLD"))
if ConfigFlags.Detector.EnableITkStrip:
result.merge(InputRenameCfg("SiHitCollection","ITkStripHits","ITkStripHitsOLD"))
if ConfigFlags.Detector.EnableHGTD:
result.merge(InputRenameCfg("SiHitCollection","HGTD_Hits","HGTD_HitsOLD"))
result.merge(InputRenameCfg("TrackRecordCollection","CaloEntryLayer","CaloEntryLayerOLD"))
if ConfigFlags.Detector.EnableCalo:
if ConfigFlags.Detector.EnableLAr:
result.merge(InputRenameCfg("LArHitContainer","LArHitEMB","LArHitEMBOLD"))
result.merge(InputRenameCfg("LArHitContainer","LArHitEMEC","LArHitEMECOLD"))
result.merge(InputRenameCfg("LArHitContainer","LArHitFCAL","LArHitFCALOLD"))
result.merge(InputRenameCfg("LArHitContainer","LArHitHEC","LArHitHECOLD"))
result.merge(InputRenameCfg("LArHitContainer","LArHitMiniFCAL","LArHitMiniFCALOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","LArCalibrationHitActive","LArCalibrationHitActiveOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","LArCalibrationHitDeadMaterial","LArCalibrationHitDeadMaterialOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","LArCalibrationHitInactive","LArCalibrationHitInactiveOLD"))
if ConfigFlags.Detector.EnableTile:
result.merge(InputRenameCfg("TileHitVector","TileHitVec","TileHitVecOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","TileCalibHitActiveCell","TileCalibHitActiveCellOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","TileCalibHitInactiveCell","TileCalibHitInactiveCellOLD"))
result.merge(InputRenameCfg("CaloCalibrationHitContainer","TileCalibHitDeadMaterial","TileCalibHitDeadMaterialOLD"))
if ConfigFlags.Detector.EnableMBTS:
result.merge(InputRenameCfg("TileHitVector","MBTSHits","MBTSHitsOLD"))
result.merge(InputRenameCfg("TrackRecordCollection","MuonEntryLayer","MuonEntryLayerOLD"))
if ConfigFlags.Detector.EnableMuon:
if ConfigFlags.Detector.EnableCSC:
result.merge(InputRenameCfg("CSCSimHitCollection","CSC_Hits","CSC_HitsOLD"))
if ConfigFlags.Detector.EnableMDT:
result.merge(InputRenameCfg("MDTSimHitCollection","MDT_Hits","MDT_HitsOLD"))
if ConfigFlags.Detector.EnableRPC:
result.merge(InputRenameCfg("RPCSimHitCollection","RPC_Hits","RPC_HitsOLD"))
if ConfigFlags.Detector.EnableTGC:
result.merge(InputRenameCfg("TGCSimHitCollection","TGC_Hits","TGC_HitsOLD"))
if ConfigFlags.Detector.EnablesTGC:
result.merge(InputRenameCfg("sTGCSimHitCollection", "sTGCSensitiveDetector" "sTGCSensitiveDetectorOLD"))
if ConfigFlags.Detector.EnableMM:
result.merge(InputRenameCfg("MMSimHitCollection", "MicromegasSensitiveDetector", "MicromegasSensitiveDetectorOLD"))
result.merge(InputRenameCfg("TrackRecordCollection","MuonExitLayer","MuonExitLayerOLD"))
#FIXME Add Renaming for Fwd Detector sim hits
return result
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
import sys
from PyJobTransforms.CommonRunArgsToFlags import commonRunArgsToFlags
from PyJobTransforms.TransformUtils import processPreExec, processPreInclude, processPostExec, processPostInclude
from SimuJobTransforms.CommonSimulationSteering import CommonSimulationCfg, specialConfigPreInclude, specialConfigPostInclude
def defaultReSimulationFlags(ConfigFlags, detectors):
"""Fill default simulation flags"""
# TODO: how to autoconfigure those
from AthenaConfiguration.Enums import ProductionStep
ConfigFlags.Common.ProductionStep = ProductionStep.Simulation
# Writing out CalibrationHits only makes sense if we are running FullG4 simulation without frozen showers
if (ConfigFlags.Sim.ISF.Simulator not in ('FullG4MT', 'FullG4MT_LongLived')) or ConfigFlags.Sim.LArParameterization!=0:
ConfigFlags.Sim.CalibrationRun = "Off"
ConfigFlags.Sim.RecordStepInfo = False
ConfigFlags.Sim.ReleaseGeoModel = False
ConfigFlags.Sim.ISFRun = True
ConfigFlags.Sim.ISF.ReSimulation = True
ConfigFlags.GeoModel.Align.Dynamic = False
#Frozen showers OFF = 0
# ConfigFlags.Sim.LArParameterization = 2
# Fatras does not support simulating the BCM, so have to switch that off
if ConfigFlags.Sim.ISF.Simulator in ('ATLFASTIIF', 'ATLFASTIIFMT', 'ATLFASTIIF_G4MS'):
try:
detectors.remove('BCM')
except ValueError:
pass
# Setup detector flags
from AthenaConfiguration.DetectorConfigFlags import setupDetectorsFromList
setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True)
def fromRunArgs(runArgs):
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior = True
from AthenaCommon.Logging import logging
log = logging.getLogger('Sim_tf')
log.info('****************** STARTING Simulation *****************')
log.info('**** Transformation run arguments')
log.info(str(runArgs))
log.info('**** Setting-up configuration flags')
from AthenaConfiguration.AllConfigFlags import ConfigFlags
commonRunArgsToFlags(runArgs, ConfigFlags)
# Generate detector list
from SimuJobTransforms.SimulationHelpers import getDetectorsFromRunArgs
detectors = getDetectorsFromRunArgs(ConfigFlags, runArgs)
if hasattr(runArgs, 'simulator'):
ConfigFlags.Sim.ISF.Simulator = runArgs.simulator
# Setup common simulation flags
defaultReSimulationFlags(ConfigFlags, detectors)
if hasattr(runArgs, 'inputHITSFile'):
ConfigFlags.Input.Files = runArgs.inputHITSFile
else:
log.error('No inputHITSFile provided. Please try using Sim_tf.py instead.')
raise RuntimeError('No intputHITSFile provided.')
if hasattr(runArgs, 'outputHITS_RSMFile'):
if runArgs.outputHITS_RSMFile == 'None':
ConfigFlags.Output.HITSFileName = ''
else:
ConfigFlags.Output.HITSFileName = runArgs.outputHITS_RSMFile
if hasattr(runArgs, 'DataRunNumber'):
ConfigFlags.Input.RunNumber = [runArgs.DataRunNumber]
ConfigFlags.Input.OverrideRunNumber = True
ConfigFlags.Input.LumiBlockNumber = [1] # dummy value
if hasattr(runArgs, 'physicsList'):
ConfigFlags.Sim.PhysicsList = runArgs.physicsList
if hasattr(runArgs, 'conditionsTag'):
ConfigFlags.IOVDb.GlobalTag = runArgs.conditionsTag
if hasattr(runArgs, 'truthStrategy'):
ConfigFlags.Sim.TruthStrategy = runArgs.truthStrategy
# Special Configuration preInclude
specialConfigPreInclude(ConfigFlags)
# Pre-include
processPreInclude(runArgs, ConfigFlags)
# Pre-exec
processPreExec(runArgs, ConfigFlags)
# Lock flags
ConfigFlags.lock()
cfg = CommonSimulationCfg(ConfigFlags, log)
# Add OLD suffix to the names of collections read in from the input HITS file
from SimuJobTransforms.ReSimInputConfig import RenameHitCollectionsOnReadCfg
cfg.merge(RenameHitCollectionsOnReadCfg(ConfigFlags))
# Special Configuration postInclude
specialConfigPostInclude(ConfigFlags, cfg)
# Post-include
processPostInclude(runArgs, ConfigFlags, cfg)
# Post-exec
processPostExec(runArgs, ConfigFlags, cfg)
import time
tic = time.time()
# Run the final accumulator
sc = cfg.run()
log.info("Run ISF_MainConfigNew_Test in " + str(time.time()-tic) + " seconds")
sys.exit(not sc.isSuccess())
......@@ -45,10 +45,27 @@ def getStreamHITS_ItemList(ConfigFlags):
"TrackRecordCollection#MuonEntryLayer"]
if ConfigFlags.Detector.EnableLAr:
ItemList += ["LArHitContainer#*"]
ItemList += ["LArHitContainer#LArHitEMB",
"LArHitContainer#LArHitEMEC",
"LArHitContainer#LArHitHEC",
"LArHitContainer#LArHitFCAL"]
if ConfigFlags.Sim.ISF.HITSMergingRequired.get('CALO', False):
ItemList += ["LArHitContainer#LArHitEMB_G4",
"LArHitContainer#LArHitEMEC_G4",
"LArHitContainer#LArHitHEC_G4",
"LArHitContainer#LArHitFCAL_G4",
"LArHitContainer#LArHitEMB_FastCaloSim",
"LArHitContainer#LArHitEMEC_FastCaloSim",
"LArHitContainer#LArHitHEC_FastCaloSim",
"LArHitContainer#LArHitFCAL_FastCaloSim"]
if ConfigFlags.Detector.EnableTile:
ItemList += ["TileHitVector#*"]
ItemList += ["TileHitVector#TileHitVec",
"TileHitVector#MBTSHits"]
if ConfigFlags.Sim.ISF.HITSMergingRequired.get('CALO', False):
ItemList += ["TileHitVector#MBTSHits_G4",
"TileHitVector#TileHitVec_G4",
"TileHitVector#TileHitVec_FastCaloSim"]
if ConfigFlags.Detector.EnableRPC:
ItemList += ["RPCSimHitCollection#*"]
......
......@@ -184,6 +184,7 @@ def addSimulationSubstep(executorSet, overlayTransform = False):
def addReSimulationSubstep(executorSet):
SimExe = athenaExecutor(name = 'ReSim',
skeletonFile = 'SimuJobTransforms/skeleton.ReSim.py',
skeletonCA = 'SimuJobTransforms.ReSimulation_Skeleton',
substep = 'rsm',
tryDropAndReload = False,
perfMonFile = 'ntuple.pmon.gz',
......
......@@ -69,7 +69,7 @@ then
status=$rc2
mv log.EVNTtoHITS log.EVNTtoHITS.CG
fi
echo "art-result: $rc1 simulation CG"
echo "art-result: $rc2 simulation CG"
rc3=-9999
if [ $rc2 -eq 0 ]
......
#!/bin/sh
#
# art-description: ReSimulation Workflow running with MC16 conditions/geometry
# art-include: master/Athena
# art-type: grid
# art-output: log.*
# art-output: original.HITS.pool.root
# art-output: resim.*.HITS.pool.root
INPUTEVNTFILE="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1"
#INPUTEVNTFILE='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/pi_E50_eta0-60.evgen.pool.root'
MAXEVENTS=10
rc=-9999
if [ -f "original.HITS.pool.root" ]
then
rc=0
else
Sim_tf.py \
--conditionsTag 'default:OFLCOND-MC16-SDR-14' \
--physicsList 'FTFP_BERT_ATL' \
--truthStrategy 'MC15aPlus' \
--simulator 'FullG4' \
--postInclude 'default:PyJobTransforms/UseFrontier.py' \
--preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
--preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' \
--DataRunNumber '284500' \
--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
--inputEVNTFile $INPUTEVNTFILE \
--outputHITSFile "original.HITS.pool.root" \
--maxEvents $MAXEVENTS \
--imf False
rc=$?
echo "art-result: $rc initial-sim"
fi
status=$rc
cp log.EVNTtoHITS log.EVNTtoHITS.initial
rc1=-9999
if [ $rc -eq 0 ]
then
ReSim_tf.py \
--CA \
--conditionsTag 'ReSim:OFLCOND-MC16-SDR-14' \
--physicsList 'FTFP_BERT_ATL' \
--truthStrategy 'MC15aPlus' \
--simulator 'FullG4MT_QS' \
--postInclude 'ReSim:PyJobTransforms.UseFrontier' \
--preInclude 'ReSim:SimuJobTransforms.BeamPipeKill,SimuJobTransforms.FrozenShowersFCalOnly,SimuJobTransforms.TightMuonStepping' \
--DataRunNumber '284500' \
--geometryVersion 'ReSim:ATLAS-R2-2016-01-00-01' \
--inputHITSFile "original.HITS.pool.root" \
--outputHITS_RSMFile "resim.CA.HITS.pool.root" \
--maxEvents $MAXEVENTS \
--postExec 'ReSim:with open("ConfigSimCA.pkl", "wb") as f: cfg.store(f)' \
--imf False
rc1=$?
status=$rc1
mv log.ReSim log.EVNTtoHITS.CA
fi
echo "art-result: $rc1 resimulation CA"
rc2=-9999
if [ $rc -eq 0 ]
then
ReSim_tf.py \
--conditionsTag 'ReSim:OFLCOND-MC16-SDR-14' \
--physicsList 'FTFP_BERT_ATL' \
--truthStrategy 'MC15aPlus' \
--simulator 'FullG4MT_QS' \
--postInclude 'ReSim:PyJobTransforms/UseFrontier.py' \
--preInclude 'ReSim:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py,SimulationJobOptions/preInclude.ExtraParticles.py,SimulationJobOptions/preInclude.G4ExtraProcesses.py' \
--preExec 'ReSim:simFlags.TightMuonStepping=True' \
--DataRunNumber '284500' \
--geometryVersion 'ReSim:ATLAS-R2-2016-01-00-01' \
--inputHITSFile "original.HITS.pool.root" \
--outputHITS_RSMFile "resim.CA.HITS.pool.root" \
--maxEvents $MAXEVENTS \
--imf False \
--athenaopts '"--config-only=ConfigSimCG.pkl"'
ReSim_tf.py \
--conditionsTag 'ReSim:OFLCOND-MC16-SDR-14' \
--physicsList 'FTFP_BERT_ATL' \
--truthStrategy 'MC15aPlus' \
--simulator 'FullG4MT_QS' \
--postInclude 'ReSim:PyJobTransforms/UseFrontier.py' \
--preInclude 'ReSim:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py,SimulationJobOptions/preInclude.ExtraParticles.py,SimulationJobOptions/preInclude.G4ExtraProcesses.py' \
--preExec 'ReSim:simFlags.TightMuonStepping=True' \
--DataRunNumber '284500' \
--geometryVersion 'ReSim:ATLAS-R2-2016-01-00-01' \
--inputHITSFile "original.HITS.pool.root" \
--outputHITS_RSMFile "resim.CG.HITS.pool.root" \
--maxEvents $MAXEVENTS \
--imf False
rc2=$?
status=$rc2
mv log.ReSim log.ReSim.CG
fi
echo "art-result: $rc2 simulation CG"
rc3=-9999
if [ $rc2 -eq 0 ]
then
# Compare the outputs
acmd.py diff-root resim.CG.HITS.pool.root resim.CA.HITS.pool.root \
--error-mode resilient \
--mode semi-detailed \
--ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings index_ref
rc3=$?
status=$rc3
fi
echo "art-result: $rc3 comparison"
ArtPackage=$1
ArtJobName=$2
art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --diff-root --mode=semi-detailed --ignore-leave RecoTimingObj_p1_EVNTtoHITS_timingsOLD
echo "art-result: $? regression"
exit $status
......@@ -4,6 +4,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from SGComps.AddressRemappingConfig import InputRenameCfg
AthSequencer=CompFactory.AthSequencer
def McEventCollectionFilterCfg(flags, **kwargs):
......@@ -211,9 +212,9 @@ def DecoratePileupAntiKt6TruthJetsCfg(flags, **kwargs):
return acc
def TruthResetAlgCfg(flags, sequenceName='SimSequence', **kwargs):
def TruthResetAlgCfg(flags, **kwargs):
result = ComponentAccumulator()
kwargs.setdefault("InputMcEventCollection", "TruthEventOLD")
kwargs.setdefault("OutputMcEventCollection", "BeamTruthEvent")
result.addEventAlgo(CompFactory.TruthResetAlg(name="TruthResetAlg", **kwargs), sequenceName)
result.addEventAlgo(CompFactory.TruthResetAlg(name="TruthResetAlg", **kwargs))
return result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment