Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # The following comments couldn't be translated into the new config version:
0002 
0003 # Force J/Psi-> ee & mumu decay 
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 process = cms.Process("Gen")
0008 # this example configuration offers some minimum
0009 # annotation, to help users get through; please
0010 # don't hesitate to read through the comments
0011 # use MessageLogger to redirect/suppress multiple
0012 # service messages coming from the system
0013 #
0014 # in this config below, we use the replace option to make
0015 # the logger let out messages of severity ERROR (INFO level
0016 # will be suppressed), and we want to limit the number to 10
0017 #
0018 process.load("FWCore.MessageService.MessageLogger_cfi")
0019 
0020 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0021 
0022 process.load("Configuration.Generator.PythiaUESettings_cfi")
0023 
0024 # Event output
0025 process.load("Configuration.EventContent.EventContent_cff")
0026 
0027 process.maxEvents = cms.untracked.PSet(
0028     input = cms.untracked.int32(5)
0029 )
0030 
0031 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0032     generator = cms.PSet(
0033         initialSeed = cms.untracked.uint32(123456789),
0034         engineName = cms.untracked.string('HepJamesRandom')
0035     )
0036 )
0037 
0038 process.source = cms.Source("EmptySource")
0039 
0040 process.generator = cms.EDProducer("Pythia6EGun",
0041     maxEventsToPrint = cms.untracked.int32(5),
0042     pythiaPylistVerbosity = cms.untracked.int32(1),
0043     pythiaHepMCVerbosity = cms.untracked.bool(True),
0044     PGunParameters = cms.PSet(
0045        ParticleID = cms.vint32(443,443),
0046        AddAntiParticle = cms.bool(False),
0047        MinPhi = cms.double(-3.14159265359),
0048        MaxPhi = cms.double(3.14159265359),
0049        MinE = cms.double(0.0),
0050        MaxE = cms.double(50.0),
0051        MinEta = cms.double(0.0),
0052        MaxEta = cms.double(2.4)
0053     ),
0054     PythiaParameters = cms.PSet(
0055         process.pythiaUESettingsBlock,
0056         pythiaJpsiDecays = cms.vstring('MDME(858,1)=1                 ! J/psi -> ee turned ON', 
0057             'MDME(859,1)=1                 ! J/psi -> mumu turned ON', 
0058             'MDME(860,1)=0                 ! J/psi -> random turned OFF'),
0059         # This is a vector of ParameterSet names to be read, in this order
0060         parameterSets = cms.vstring('pythiaUESettings', 
0061             'pythiaJpsiDecays')
0062     )
0063 )
0064 
0065 process.FEVT = cms.OutputModule("PoolOutputModule",
0066     process.FEVTSIMEventContent,
0067     fileName = cms.untracked.string('gen_jpsi.root')
0068 )
0069 
0070 process.p = cms.Path(process.generator)
0071 process.outpath = cms.EndPath(process.FEVT)
0072 process.schedule = cms.Schedule(process.p,process.outpath)
0073 
0074