Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:40

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PremixStage1")
0004 
0005 process.source = cms.Source("EmptySource")
0006 process.maxEvents = cms.untracked.PSet(
0007      input = cms.untracked.int32(3)
0008 )
0009 
0010 process.load("IOMC.RandomEngine.IOMC_cff")
0011 
0012 from SimGeneral.PreMixingModule.mixOne_premix_on_sim_cfi import mixData as _mixData
0013 process.mixData1 = _mixData.clone(
0014     input = dict(fileNames = ["file:testPremixStage1.root"]),
0015     workers = cms.PSet(
0016         pileup = _mixData.workers.pileup.clone(
0017             GenPUProtonsInputTags = []
0018         )
0019     ),
0020     adjustPileupDistribution = [
0021         cms.PSet(
0022             firstRun = cms.uint32(1),
0023             firstBinPileup = cms.uint32(0),
0024             pileupProbabilities = cms.vdouble(0,1,1,0)
0025         ),
0026     ],
0027     minBunch = -1,
0028     maxBunch = 1,
0029 )
0030 process.RandomNumberGeneratorService.mixData1 = process.RandomNumberGeneratorService.mixData.clone()
0031 process.testMixData1 = cms.EDAnalyzer("TestPreMixingPileupAnalyzer",
0032     src = cms.untracked.InputTag("mixData1"),
0033     allowedPileups = cms.untracked.vuint32(1,2)
0034 )
0035 
0036 process.mixData2 = process.mixData1.clone(
0037     adjustPileupDistribution = {0: dict(pileupProbabilities = [0.8,0,0,0.5])}
0038 )
0039 process.RandomNumberGeneratorService.mixData2 = process.RandomNumberGeneratorService.mixData.clone()
0040 process.testMixData2 = process.testMixData1.clone(
0041     src = "mixData2",
0042     allowedPileups = [0,3]
0043 )
0044 
0045 process.t = cms.Task(
0046     process.mixData1,
0047     process.mixData2,
0048 )
0049 process.s = cms.Sequence(
0050     process.testMixData1+
0051     process.testMixData2
0052 )
0053 process.p = cms.Path(process.s, process.t)