File indexing completed on 2024-04-06 12:29:57
0001 import FWCore.ParameterSet.Config as cms
0002
0003 process = cms.Process("PROD")
0004 process.load("SimG4CMS.Calo.PythiaMinBias_cfi")
0005 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0006 process.load('FWCore.MessageService.MessageLogger_cfi')
0007 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0008 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0009 process.load('Configuration.Geometry.GeometrySimDB_cff')
0010 process.load("Configuration.StandardSequences.MagneticField_cff")
0011 process.load("Configuration.EventContent.EventContent_cff")
0012 process.load('Configuration.StandardSequences.Generator_cff')
0013 process.load('Configuration.StandardSequences.SimIdeal_cff')
0014 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0015
0016 from Configuration.AlCa.GlobalTag import GlobalTag
0017 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run1_mc', '')
0018
0019 if 'MessageLogger' in process.__dict__:
0020 process.MessageLogger.G4cout=dict()
0021 process.MessageLogger.G4cerr=dict()
0022
0023 process.load("IOMC.RandomEngine.IOMC_cff")
0024 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0025 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0026 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0027
0028 process.Timing = cms.Service("Timing")
0029
0030 process.source = cms.Source("EmptySource",
0031 firstRun = cms.untracked.uint32(1),
0032 firstEvent = cms.untracked.uint32(1)
0033 )
0034
0035 process.maxEvents = cms.untracked.PSet(
0036 input = cms.untracked.int32(2)
0037 )
0038
0039 process.rndmStore = cms.EDProducer("RandomEngineStateProducer")
0040
0041 process.generator = cms.EDProducer("FlatRandomMultiParticlePGunProducer",
0042 PGunParameters = cms.PSet(
0043 PartID = cms.vint32(211,321,2212),
0044 ProbParts = cms.vdouble(0.695,0.163,0.142),
0045 MinEta = cms.double(-2.3),
0046 MaxEta = cms.double(2.3),
0047 MinPhi = cms.double(-3.1415926),
0048 MaxPhi = cms.double(3.1415926),
0049 MinP = cms.double(1.0),
0050 MaxP = cms.double(20.5)
0051 ),
0052 Verbosity = cms.untracked.int32(0),
0053 AddAntiParticle = cms.bool(True),
0054 firstRun = cms.untracked.uint32(1)
0055 )
0056
0057 process.generation_step = cms.Path(process.pgen)
0058 process.simulation_step = cms.Path(process.psim)
0059
0060 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0061 process.g4SimHits.FileNameGDML = 'cms2016.gdml'
0062
0063
0064 process.schedule = cms.Schedule(process.generation_step,
0065 process.simulation_step
0066 )
0067
0068
0069 for path in process.paths:
0070 getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0071