|
| 1 | +import FWCore.ParameterSet.Config as cms |
| 2 | + |
| 3 | +process = cms.Process("TQAF") |
| 4 | + |
| 5 | +process.load("FWCore.MessageLogger.MessageLogger_cfi") |
| 6 | +process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff") |
| 7 | + |
| 8 | +process.source = cms.Source("EmptySource") |
| 9 | + |
| 10 | +process.generator = cms.EDFilter("Pythia8PtGun", |
| 11 | + PGunParameters = cms.PSet( |
| 12 | + AddAntiParticle = cms.bool(True), |
| 13 | + MaxEta = cms.double(2.5), |
| 14 | + MaxPhi = cms.double(3.14159265359), |
| 15 | + MaxPt = cms.double(10.01), |
| 16 | + MinEta = cms.double(-2.5), |
| 17 | + MinPhi = cms.double(-3.14159265359), |
| 18 | + MinPt = cms.double(9.99), |
| 19 | + ParticleID = cms.vint32(11) |
| 20 | + ), |
| 21 | + PythiaParameters = cms.PSet( |
| 22 | + parameterSets = cms.vstring() |
| 23 | + ), |
| 24 | + Verbosity = cms.untracked.int32(0), |
| 25 | + firstRun = cms.untracked.uint32(1), |
| 26 | + psethack = cms.string('single electron pt 10') |
| 27 | +) |
| 28 | + |
| 29 | +process.genParticles = cms.EDProducer("GenParticleProducer", |
| 30 | + abortOnUnknownPDGCode = cms.untracked.bool(False), |
| 31 | + saveBarCodes = cms.untracked.bool(True), |
| 32 | + src = cms.InputTag("generator:unsmeared") |
| 33 | +) |
| 34 | + |
| 35 | + |
| 36 | +## define maximal number of events to loop over |
| 37 | +process.maxEvents = cms.untracked.PSet( |
| 38 | + input = cms.untracked.int32(100) |
| 39 | +) |
| 40 | +## configure process options |
| 41 | +process.options = cms.untracked.PSet( |
| 42 | + allowUnscheduled = cms.untracked.bool(True), |
| 43 | + wantSummary = cms.untracked.bool(True) |
| 44 | +) |
| 45 | + |
| 46 | +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') |
| 47 | +process.load("GeneratorInterface.RivetInterface.genParticles2HepMC_cfi") |
| 48 | +process.load("GeneratorInterface.RivetInterface.particleLevel_cfi") |
| 49 | +process.particleLevel.src = cms.InputTag("genParticles2HepMC:unsmeared") |
| 50 | + |
| 51 | +process.path = cms.Path(process.generator*process.genParticles*process.genParticles2HepMC*process.particleLevel) |
| 52 | + |
| 53 | +process.out = cms.OutputModule("PoolOutputModule", |
| 54 | + fileName = cms.untracked.string("particleLevel.root"), |
| 55 | + outputCommands = cms.untracked.vstring( |
| 56 | + "drop *", |
| 57 | + "keep *_genParticles_*_*", |
| 58 | + "keep *_particleLevel_*_*", |
| 59 | + ), |
| 60 | +) |
| 61 | +process.outPath = cms.EndPath(process.out) |
0 commit comments