Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-27 14:07:58

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("HcalTestNS")
0003 
0004 process.load("SimG4CMS.Calo.pythiapdt_cfi")
0005 process.load('FWCore.MessageService.MessageLogger_cfi')
0006 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0007 process.load('Geometry.CMSCommonData.cmsExtendedGeometry2017Plan1XML_cfi')
0008 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0009 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0010 process.load("Geometry.HcalCommonData.hcalDDConstants_cff")
0011 process.load("Geometry.MuonNumbering.muonGeometryConstants_cff")
0012 process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff")
0013 process.load("Configuration.StandardSequences.MagneticField_cff")
0014 process.load("Configuration.EventContent.EventContent_cff")
0015 process.load('Configuration.StandardSequences.Generator_cff')
0016 process.load('Configuration.StandardSequences.SimIdeal_cff')
0017 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0018 from Configuration.AlCa.autoCond import autoCond
0019 process.GlobalTag.globaltag = autoCond['run2_mc']
0020 
0021 process.load("IOMC.RandomEngine.IOMC_cff")
0022 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0023 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0024 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0025 
0026 process.maxEvents = cms.untracked.PSet(
0027     input = cms.untracked.int32(10)
0028 )
0029 
0030 process.source = cms.Source("EmptySource",
0031     firstRun        = cms.untracked.uint32(1),
0032     firstEvent      = cms.untracked.uint32(1)
0033 )
0034 
0035 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0036     PGunParameters = cms.PSet(
0037         PartID = cms.vint32(13),
0038         MinEta = cms.double(1.2),
0039         MaxEta = cms.double(3.0),
0040         MinPhi = cms.double(5.45415),
0041         MaxPhi = cms.double(5.80322),
0042         MinPt  = cms.double(100.),
0043         MaxPt  = cms.double(100.)
0044     ),
0045     Verbosity       = cms.untracked.int32(0),
0046     AddAntiParticle = cms.bool(True)
0047 )
0048 
0049 process.generation_step = cms.Path(process.pgen)
0050 process.simulation_step = cms.Path(process.psim)
0051 
0052 process.g4SimHits.HCalSD.TestNS = True
0053 
0054 # Schedule definition
0055 process.schedule = cms.Schedule(process.generation_step,
0056                                 process.simulation_step
0057                                 )
0058 
0059 # filter all path with the production filter sequence
0060 for path in process.paths:
0061         getattr(process,path)._seq = process.generator * getattr(process,path)._seq