def getVertexBeamCondPositioner(name="VertexBeamCondPositioner", **kwargs): from G4AtlasApps.SimFlags import simFlags #simFlags.VertexTimeOffset.get_Value() kwargs.setdefault('RandomSvc', simFlags.RandomSvcMT.get_Value()) # TODO This should really be with the BeamCondSvc configuration. # 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") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitOnline("INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className='AthenaAttributeList') return CfgMgr.Simulation__VertexBeamCondPositioner(name, **kwargs)
#-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- theApp.EvtMax = 100 #-------------------------------------------------------------- # Algorithms #-------------------------------------------------------------- # Beam spot conditions from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitOnline("INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className="AthenaAttributeList") from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg condSeq += BeamSpotCondAlg("BeamSpotCondAlg") # Run the overlay from AthenaCommon import CfgGetter EventInfoOverlay = CfgGetter.getAlgorithm("EventInfoOverlay") EventInfoOverlay.OutputLevel = DEBUG topSequence += EventInfoOverlay #-------------------------------------------------------------- # EventLoop #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties as jp nThreads = jp.ConcurrencyFlags.NumThreads() if nThreads > 0: EventLoop = Service("AthenaHiveEventLoopMgr") else:
athenaCommonFlags.isOnline = True globalflags.InputFormat = 'bytestream' globalflags.DataSource = 'data' globalflags.DetDescrVersion = 'ATLAS-R2-2016-01-00-01' globalflags.ConditionsTag = 'CONDBR2-HLTP-2018-01' from IOVDbSvc.CondDB import conddb svcMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag() conddb.addFolder( 'beampos.db', '/Indet/Onl/Beampos <key>/Indet/Beampos</key> <tag>IndetBeamposOnl-HLT-UPD1-001-00</tag>', className='AthenaAttributeList', extensible=True) # Create topSequence from TrigP1Test.BeamSpotUpdate import BeamSpotWriteAlg from InDetBeamSpotFinder.InDetBeamSpotFinderConf import InDet__InDetBeamSpotReader topSequence = AlgSequence() topSequence += BeamSpotWriteAlg() topSequence += InDet__InDetBeamSpotReader(VxContainer="") # Create conditions algorithms from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg condSeq = AthSequencer('AthCondSeq') condSeq += BeamSpotCondAlg('BeamSpotCondAlg') condSeq.BeamSpotCondAlg.OutputLevel = DEBUG svcMgr.HltEventLoopMgr.CoolUpdateTool.enable()