# ad-hoc configuration of pileup event loop manager

theApp.EventLoop = "PileUpEventLoopMgr"

pileUpEventLoopMgr = PileUpEventLoopMgr()
from Digitization.DigitizationFlags import jobproperties
pupStream = "PileUpCollXingStream"
jobproperties.Digitization.rndmSeedList.addSeed( pupStream, 123, 345 )
#define inputs
pileUpEventLoopMgr.OrigSelector="EventSelector"

from PileUpComps.PileUpCompsConf import BkgStreamsCache
from Digitization import PileUpEventType
from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool
minBiasCache = BkgStreamsCache("MinBiasCache")
minBiasCache.CollPerXing=Ncoll
minBiasCache.CollDistribution="Poisson"
minBiasCache.ReadDownscaleFactor=1  # read one new event every event
minBiasCache.RndmGenSvc=jobproperties.Digitization.rndmSvc()
minBiasCache.RndmStreamName=pupStream
minBiasEvtSel = EventSelectorAthenaPool("minBiasEventSelector")
minBiasEvtSel.InputCollections = minBiasInputCols
minBiasEvtSel.KeepInputFilesOpen = True
ServiceMgr += minBiasEvtSel
minBiasCache.EventSelector="minBiasEventSelector"
pileUpEventLoopMgr.bkgCaches += [ minBiasCache ]

#define output stream
pileUpEventLoopMgr.OutStreamType = "AthenaOutputStream"

#define time range to be studied. t0 at t=0, xing=0
Exemple #2
0
PileUpEventLoopMgr = Service("PileUpEventLoopMgr")

pupStream = "PileUpCollXingStream"
from PileUpComps.PileUpCompsConf import BkgStreamsCache
from Digitization import PileUpEventType
from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool

from Digitization.DigitizationFlags import digitizationFlags
PileUpEventLoopMgr.OrigSelector = "EventSelector"
minBiasCache = BkgStreamsCache("MinBiasCache")
if hasattr(digitizationFlags, 'numberOfNDMinBias'):
    minBiasCache.CollPerXing = digitizationFlags.numberOfNDMinBias()
elif hasattr(digitizationFlags, 'numberOfLowPtMinBias'):
    minBiasCache.CollPerXing = digitizationFlags.numberOfLowPtMinBias()
else:
    raise AttributeError(
        "These job options require digitization jobproperties not present in this release! This job will crash."
    )
minBiasCache.RndmGenSvc = digitizationFlags.rndmSvc()
minBiasCache.RndmStreamName = pupStream
minBiasCache.PileUpEventType = PileUpEventType.MinimumBias
minBiasCache.ReadDownscaleFactor = 10  # read one new event every event

from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool
minBiasEvtSel = EventSelectorAthenaPool("minBiasEventSelector")
if hasattr(digitizationFlags, 'NDMinBiasInputCols'):
    minBiasEvtSel.InputCollections = digitizationFlags.NDMinBiasInputCols()
elif hasattr(digitizationFlags, 'LowPtMinBiasInputCols'):
    minBiasEvtSel.InputCollections = digitizationFlags.LowPtMinBiasInputCols()
else:
    raise AttributeError(