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
pileUpEventLoopMgr.XingFrequency=25;
pileUpEventLoopMgr.firstXing=0
pileUpEventLoopMgr.lastXing=0

pileUpEventLoopMgr.OutputLevel=VERBOSE

ServiceMgr += pileUpEventLoopMgr

# in any case we need the PileUpMergeSvc for the digitize algos
示例#2
0
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(
        "These job options require digitization jobproperties not present in this release! This job will crash."
    )
minBiasEvtSel.KeepInputFilesOpen = kfOpen
minBiasEvtSel.ProcessMetadata = False
ServiceMgr += minBiasEvtSel
minBiasCache.EventSelector = 'minBiasEventSelector'
PileUpEventLoopMgr.bkgCaches += [minBiasCache]

MergeMcEventCollection = Algorithm("MergeMcEventCollection")
if hasattr(MergeMcEventCollection, 'MergeMcEventCollTool'):
    MergeMcEventCollection.MergeMcEventCollTool.TruthCollKey = "GEN_EVENT"
else:
    MergeMcEventCollection.TruthCollKey = "GEN_EVENT"

try:
    itemlist = StreamRDO_FH.ItemList
except:
    itemlist = StreamRDO.MetaDataItemList

if itemlist.count("IOVMetaDataContainer#*"):
    print 'ZLM found it!'