diff --git a/Control/AthenaConfiguration/python/MainServicesConfig.py b/Control/AthenaConfiguration/python/MainServicesConfig.py index 5ae6073308f84590b110fb94489074c4eecce72c..666aa64607dbc014a0b169ac85f2b92bcddfbd9d 100644 --- a/Control/AthenaConfiguration/python/MainServicesConfig.py +++ b/Control/AthenaConfiguration/python/MainServicesConfig.py @@ -22,9 +22,8 @@ def MainServicesMiniCfg(loopMgr='AthenaEventLoopMgr', masterSequence='AthAlgSeq' return cfg -def MainServicesCfg(cfgFlags): +def MainServicesCfg(cfgFlags, LoopMgr='AthenaEventLoopMgr'): # Run a serial job for threads=0 - LoopMgr = 'AthenaEventLoopMgr' if cfgFlags.Concurrency.NumThreads>0: if cfgFlags.Concurrency.NumConcurrentEvents==0: # In a threaded job this will mess you up because no events will be processed diff --git a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py index 5d6eb8d20bac9f602c7377ce769aab0328ee2765..d9bd9518e4bcf5d973b646c7992ce0c519cb3072 100755 --- a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py +++ b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py @@ -133,6 +133,22 @@ def BeamEffectsAlgCfg(ConfigFlags, **kwargs): return acc +def BeamSpotFixerAlgCfg(ConfigFlags, **kwargs): + from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg + acc = BeamSpotCondAlgCfg(ConfigFlags) + + kwargs.setdefault('InputKey', 'Input_EventInfo') + + if ConfigFlags.Digitization.PileUpPremixing: + kwargs.setdefault('OutputKey', ConfigFlags.Overlay.BkgPrefix + 'EventInfo') + else: + kwargs.setdefault('OutputKey', 'EventInfo') + + alg = CompFactory.Simulation.BeamSpotFixerAlg(name="BeamSpotFixerAlg", **kwargs) + acc.addEventAlgo(alg, sequenceName="AthAlgSeq", primary=True) + return acc + + if __name__ == "__main__": from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG diff --git a/Simulation/Digitization/python/PileUpConfigNew.py b/Simulation/Digitization/python/PileUpConfigNew.py index 9f4a8c8fd0035a35805b38c2ead06ad2cb27adcb..3b605d509f185b318462518be76be58c53411f0a 100644 --- a/Simulation/Digitization/python/PileUpConfigNew.py +++ b/Simulation/Digitization/python/PileUpConfigNew.py @@ -11,11 +11,17 @@ from Digitization.RunDependentConfigNew import ( maxNevtsPerXing, LumiProfileSvcCfg, NoProfileSvcCfg, ) +from BeamEffects.BeamEffectsAlgConfig import BeamSpotFixerAlgCfg def PileUpConfigdSFMT(name): """Local wrapper for dSFMT RNG service""" - return dSFMT(name + " OFFSET 340 123 345") + seedOffset = " OFFSET 340 123 345" + if name=="PileUpCollXingStream": + seedOffset = " OFFSET 340 123 345" + if name=="BEAMINT": + seedOffset = " OFFSET 340 678 91011" + return dSFMT(name + seedOffset) def StepArrayBMCfg(flags, name="StepArrayBM", **kwargs): @@ -37,7 +43,7 @@ def FixedArrayBMCfg(flags, name="FixedArrayBM", **kwargs): def ArrayBMCfg(flags, name="ArrayBM", **kwargs): acc = ComponentAccumulator() kwargs.setdefault("IntensityPattern", flags.Digitization.PU.BeamIntensityPattern) - acc.merge(PileUpConfigdSFMT("PileUpCollXingStream")) + acc.merge(PileUpConfigdSFMT("BEAMINT")) kwargs.setdefault("RandomSvc", acc.getService("AtDSFMTGenSvc")) acc.addService(CompFactory.ArrayBM(name, **kwargs)) return acc @@ -259,7 +265,8 @@ def BeamHaloCacheCfg(flags, name="BeamHaloCache", **kwargs): def PileUpEventLoopMgrCfg(flags, name="PileUpEventLoopMgr", **kwargs): - acc = ComponentAccumulator() + acc = BeamSpotFixerAlgCfg(flags) # Needed currently for running on 21.0 HITS + # SubDet By SubDet (default) or Xing By Xing Pile-up? kwargs.setdefault("XingByXing", flags.Digitization.DoXingByXingPileUp) # Bunch Structure