Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Generator.PythiaUESettings_cfi import *
0004 
0005 process = cms.Process("TEST")
0006 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0007 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0008 #process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0009 
0010 process.load("Configuration.StandardSequences.Services_cff")
0011 
0012 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0013     generator = cms.PSet(
0014         initialSeed = cms.untracked.uint32(123456789),
0015         engineName = cms.untracked.string('HepJamesRandom')
0016     )
0017 )
0018 
0019 process.randomEngineStateProducer = cms.EDProducer("RandomEngineStateProducer")
0020 
0021 # The following three lines reduce the clutter of repeated printouts
0022 # of the same exception message.
0023 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0024 
0025 
0026 
0027 
0028 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1000))
0029 
0030 process.source = cms.Source("LHESource",
0031     fileNames = cms.untracked.vstring('file:ttbar_5flavours_xqcut20_10TeV.lhe')
0032     # fileNames = cms.untracked.vstring('file:/uscms_data/d2/yarba_j/lhe_for_tests/7TeV_Zbb_run45040_unweighted_events_qcut13_mgPostv2.lhe')
0033     # fileNames = cms.untracked.vstring('file:/uscms_data/d2/yarba_j/lhe_for_tests/7TeV_ttbarjets_run621_unweighted_events_qcut40_mgPost.lhe')
0034 )
0035 
0036 process.generator = cms.EDFilter("Pythia6HadronizerFilter",
0037     pythiaHepMCVerbosity = cms.untracked.bool(True),
0038     maxEventsToPrint = cms.untracked.int32(0),
0039     pythiaPylistVerbosity = cms.untracked.int32(1),
0040     comEnergy = cms.double(10000.0),
0041     PythiaParameters = cms.PSet(
0042         pythiaUESettingsBlock,
0043         processParameters = cms.vstring('MSEL=0         ! User defined processes', 
0044                         'PMAS(5,1)=4.4   ! b quark mass',
0045                         'PMAS(6,1)=172.4 ! t quark mass',
0046             'MSTJ(1)=1       ! Fragmentation/hadronization on or off',
0047             'MSTP(61)=1      ! Parton showering on or off'),
0048         # This is a vector of ParameterSet names to be read, in this order
0049         parameterSets = cms.vstring('pythiaUESettings', 
0050             'processParameters')
0051     ),
0052     jetMatching = cms.untracked.PSet(
0053        scheme = cms.string("Madgraph"),
0054        mode = cms.string("auto"),   # soup, or "inclusive" / "exclusive"
0055        MEMAIN_etaclmax = cms.double(5.), # -1. for other samples, to pick it up from LHE file
0056        MEMAIN_qcut = cms.double(30.),   # -1. for other samples, to pickup from LHE
0057        MEMAIN_minjets = cms.int32(-1),
0058        MEMAIN_maxjets = cms.int32(-1),
0059        MEMAIN_showerkt = cms.double(0),  # use 1=yes only for pt-ordered showers !
0060        MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; 
0061                                       # if nqmatch=4, then all showered partons from b's are NOT taken into account
0062                       # Note (JVY): for most cases it should stay 5 or can be set to -1 (if provided
0063                       #             in the LHE file; otherwise the job will throw); however, for bbar
0064                       #             it should be set to 4 (see above), unless it's given in the LHE
0065        MEMAIN_excres = cms.string(""),
0066        outTree_flag = cms.int32(0)        # 1=yes, write out the tree for future sanity check
0067     )    
0068 )
0069 
0070 process.GEN = cms.OutputModule("PoolOutputModule",
0071     fileName = cms.untracked.string('TestTTbar_MGmatch.root'),
0072     SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('p'))
0073 
0074 )
0075 
0076 process.p = cms.Path(process.generator)
0077 process.p1 = cms.Path(process.randomEngineStateProducer)
0078 process.outpath = cms.EndPath(process.GEN)
0079 
0080 process.schedule = cms.Schedule(process.p, process.p1, process.outpath)