Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-18 09:15:34

0001 # cmsRun single_neutrino_cfg.py nEvents=1000
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 from FWCore.ParameterSet.VarParsing import VarParsing
0005 
0006 process = cms.Process("TestProcess")
0007 
0008 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0009 process.load("GeneratorInterface.Core.generatorSmeared_cfi")
0010 process.load("Configuration.EventContent.EventContent_cff")
0011 from Configuration.StandardSequences.VtxSmeared import VtxSmeared
0012 process.load(VtxSmeared['NoSmear'])
0013 
0014 options = VarParsing('analysis')
0015 
0016 options.register('nEvents',
0017                  100000,
0018                  VarParsing.multiplicity.singleton,
0019                  VarParsing.varType.int,
0020                  "Maximum number of events"
0021 )
0022 
0023 options.parseArguments()
0024 
0025 process.maxEvents = cms.untracked.PSet(
0026     input = cms.untracked.int32(options.nEvents)
0027 )
0028 
0029 process.load("IOMC.RandomEngine.IOMC_cff")
0030 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0031 process.RandomNumberGeneratorService.VtxSmeared.engineName = cms.untracked.string('HepJamesRandom')
0032 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = cms.untracked.uint32(98765432)
0033 
0034 process.source = cms.Source("EmptySource",
0035     firstRun        = cms.untracked.uint32(1),
0036     firstEvent      = cms.untracked.uint32(1)
0037 )
0038 
0039 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0040     PGunParameters = cms.PSet(
0041         PartID = cms.vint32(14),
0042         MinEta = cms.double(-6.0),
0043         MaxEta = cms.double(6.0),
0044         MinPhi = cms.double(-3.14159265359),
0045         MaxPhi = cms.double(3.14159265359),
0046         MinE   = cms.double(10.0),
0047         MaxE   = cms.double(10.0)
0048     ),
0049     AddAntiParticle = cms.bool(False),
0050     Verbosity       = cms.untracked.int32(0)
0051 )
0052 
0053 process.o1 = cms.OutputModule("PoolOutputModule",
0054     process.FEVTSIMEventContent,
0055     fileName = cms.untracked.string('single_neutrino_random.root')
0056 )
0057 
0058 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared)
0059 process.outpath = cms.EndPath(process.o1)