Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
import FWCore.ParameterSet.Config as cms

process = cms.Process("PROD")

process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff")

process.source = cms.Source("EmptySource")

process.generator = cms.EDFilter("Pythia8GeneratorFilter",
    maxEventsToPrint = cms.untracked.int32(0),
    pythiaPylistVerbosity = cms.untracked.int32(1),
    filterEfficiency = cms.untracked.double(1.0),
    pythiaHepMCVerbosity = cms.untracked.bool(False),
    comEnergy = cms.double(13000.),

   #Turning on CMSSW Pythia8Interface resonance scale setting and pythia8 emission veto:

    PythiaParameters = cms.PSet(
        pythia8PowhegEmissionVetoSettings = cms.vstring(
              'POWHEG:veto = 1',
              'POWHEG:pTdef = 1',
              'POWHEG:emitted = 0',
              'POWHEG:pTemt = 0',
              'POWHEG:pThard = 0',
              'POWHEG:vetoCount = 100',
              'SpaceShower:pTmaxMatch = 2',
              'TimeShower:pTmaxMatch = 2',
        ),
        pythia8_example12 = cms.vstring(
              'POWHEGres:calcScales = on',
              'Beams:frameType = 4',
              'Beams:LHEF = powheg-b_bbar_4l.lhe',
        ),
        parameterSets = cms.vstring('pythia8PowhegEmissionVetoSettings', 'pythia8_example12')
    )

)

#if emissionVeto is on && MPIveto > 0 add 'MultipartonInteractions:pTmaxMatch = 2'

process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger = cms.Service("MessageLogger",
    cerr = cms.untracked.PSet(
        enable = cms.untracked.bool(False)
    ),
    cout = cms.untracked.PSet(
        default = cms.untracked.PSet(
            limit = cms.untracked.int32(2)
        ),
        enable = cms.untracked.bool(True)
    )
)

process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
    generator = cms.PSet(
        initialSeed = cms.untracked.uint32(123456789),
    )
)

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(100)
)

process.GEN = cms.OutputModule("PoolOutputModule",
    fileName = cms.untracked.string('pythia8ex12.root')
)

process.p = cms.Path(process.generator)
process.outpath = cms.EndPath(process.GEN)

process.schedule = cms.Schedule(process.p, process.outpath)