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 
0003 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0004 process = cms.Process('PROD',Run2_2018)
0005 
0006 process.load("SimG4CMS.Calo.pythiapdt_cfi")
0007 process.load('FWCore.MessageService.MessageLogger_cfi')
0008 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0009 process.load("Configuration.Geometry.GeometryExtended2018Reco_cff")
0010 #process.load("Configuration.Geometry.GeometryExtended2021Reco_cff")
0011 process.load("Configuration.StandardSequences.MagneticField_cff")
0012 process.load("Configuration.EventContent.EventContent_cff")
0013 process.load('Configuration.StandardSequences.Generator_cff')
0014 process.load('Configuration.StandardSequences.SimIdeal_cff')
0015 process.load("SimG4CMS.Calo.hcalTestSimHitID_cfi")
0016 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0017 from Configuration.AlCa.autoCond import autoCond
0018 process.GlobalTag.globaltag = autoCond['run2_mc']
0019 
0020 if 'MessageLogger' in process.__dict__:
0021     process.MessageLogger.G4cerr=dict()
0022     process.MessageLogger.HcalSim=dict()
0023 
0024 process.load("IOMC.RandomEngine.IOMC_cff")
0025 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0026 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0027 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0028 
0029 process.maxEvents = cms.untracked.PSet(
0030     input = cms.untracked.int32(100)
0031 )
0032 
0033 process.source = cms.Source("EmptySource",
0034     firstRun        = cms.untracked.uint32(1),
0035     firstEvent      = cms.untracked.uint32(1)
0036 )
0037 
0038 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0039     PGunParameters = cms.PSet(
0040         PartID = cms.vint32(13),
0041         MinEta = cms.double(1.22),
0042         MaxEta = cms.double(1.70),
0043         MinPhi = cms.double(-3.14159265359),
0044         MaxPhi = cms.double(3.14159265359),
0045         MinPt  = cms.double(100.),
0046         MaxPt  = cms.double(100.)
0047     ),
0048     Verbosity       = cms.untracked.int32(0),
0049     AddAntiParticle = cms.bool(True)
0050 )
0051 
0052 process.generation_step = cms.Path(process.pgen)
0053 process.simulation_step = cms.Path(process.psim)
0054 process.analysis_step   = cms.Path(process.hcalTestSimHitID)
0055 
0056 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0057 process.g4SimHits.HCalSD.TestNumberingScheme  = True
0058 process.hcalTestSimHitID.testNumbering = True
0059 process.hcalTestSimHitID.dumpHits      = True
0060 
0061 # Schedule definition
0062 process.schedule = cms.Schedule(process.generation_step,
0063                                 process.simulation_step,
0064                                 process.analysis_step,
0065                                 )
0066 
0067 # filter all path with the production filter sequence
0068 for path in process.paths:
0069         getattr(process,path)._seq = process.generator * getattr(process,path)._seq