Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:41

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 
0005 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0006 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0007 process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi")
0008 
0009 process.source = cms.Source("EmptySource")
0010 
0011 from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import * 
0012 from GeneratorInterface.ExternalDecays.TauolaSettings_cff import *
0013 
0014 process.generator = cms.EDFilter("Pythia8GeneratorFilter",
0015     maxEventsToPrint = cms.untracked.int32(1),
0016     pythiaPylistVerbosity = cms.untracked.int32(0),
0017     filterEfficiency = cms.untracked.double(1.0),
0018     pythiaHepMCVerbosityParticles = cms.untracked.bool(True),
0019     comEnergy = cms.double(13000.),
0020 
0021     ExternalDecays = cms.PSet(
0022         EvtGen1 = cms.untracked.PSet(
0023             decay_table = cms.string('GeneratorInterface/EvtGenInterface/data/DECAY_NOLONGLIFE.DEC'),
0024             particle_property_file = cms.FileInPath('GeneratorInterface/EvtGenInterface/data/evt.pdl'),
0025             convertPythiaCodes = cms.untracked.bool(False), # this is needed since 1.6
0026             list_forced_decays = cms.vstring(),
0027             operates_on_particles = cms.vint32(0) #will decay all particles coded in interface, it test the whole system
0028         ),
0029         parameterSets = cms.vstring('EvtGen1')
0030     ),
0031         
0032     PythiaParameters = cms.PSet(
0033         processParameters = cms.vstring('Top:gg2ttbar = on',
0034                                         'Top:qqbar2ttbar = on'
0035                                         ),
0036         parameterSets = cms.vstring('processParameters')
0037     )
0038 )
0039 
0040 # The line below removes messages like "particle not recognized by pythia"
0041 # It uses EvtGenSetting_cff above
0042 process.generator.PythiaParameters.processParameters.extend(EvtGenExtraParticles)
0043 
0044 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0045 process.MessageLogger = cms.Service("MessageLogger",
0046     cerr = cms.untracked.PSet(
0047         enable = cms.untracked.bool(False)
0048     ),
0049     cout = cms.untracked.PSet(
0050         default = cms.untracked.PSet(
0051             limit = cms.untracked.int32(100)
0052         ),
0053         enable = cms.untracked.bool(True)
0054     )
0055 )
0056 
0057 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0058     generator = cms.PSet(
0059         initialSeed = cms.untracked.uint32(123456789),
0060         engineName = cms.untracked.string('HepJamesRandom')
0061     )
0062 )
0063 
0064 process.maxEvents = cms.untracked.PSet(
0065     input = cms.untracked.int32(34)
0066 )
0067 
0068 process.GEN = cms.OutputModule("PoolOutputModule",
0069     fileName = cms.untracked.string('Py8_tt_evtgen1.root')
0070 )
0071 
0072 process.genParticles.src = cms.InputTag("generator","unsmeared")
0073 
0074 process.printGenParticles = cms.EDAnalyzer("ParticleListDrawer",
0075                                            src = cms.InputTag("genParticles"),
0076                                            maxEventsToPrint = cms.untracked.int32(3) )
0077 
0078 process.p = cms.Path(process.generator*process.genParticles*process.printGenParticles)
0079 process.outpath = cms.EndPath(process.GEN)
0080 
0081 process.schedule = cms.Schedule(process.p, process.outpath)