Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0004 process = cms.Process("Sim",Run2_2018)
0005 
0006 process.load("SimG4CMS.Calo.PythiaZee_cfi")
0007 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0008 process.load('FWCore.MessageService.MessageLogger_cfi')
0009 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0010 process.load('Configuration.Geometry.GeometryExtended2018Reco_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.CaloSimHitStudy_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 process.source = cms.Source("EmptySource")
0021 
0022 process.maxEvents = cms.untracked.PSet(
0023     input = cms.untracked.int32(50)
0024 )
0025 
0026 if 'MessageLogger' in process.__dict__:
0027     process.MessageLogger.G4cerr=dict()
0028     process.MessageLogger.HitStudy=dict()
0029 
0030 process.Timing = cms.Service("Timing")
0031 
0032 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0033     oncePerEventMode = cms.untracked.bool(True),
0034     showMallocInfo = cms.untracked.bool(True),
0035     dump = cms.untracked.bool(True),
0036     ignoreTotal = cms.untracked.int32(1)
0037 )
0038 
0039 process.load("IOMC.RandomEngine.IOMC_cff")
0040 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0041 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0042 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0043 process.rndmStore = cms.EDProducer("RandomEngineStateProducer")
0044 
0045 process.TFileService = cms.Service("TFileService",
0046     fileName = cms.string('zee_QGSP_FTFP_BERT_EML.root')
0047 )
0048 
0049 # Event output
0050 process.load("Configuration.EventContent.EventContent_cff")
0051 
0052 process.output = cms.OutputModule("PoolOutputModule",
0053     process.FEVTSIMEventContent,
0054     fileName = cms.untracked.string('simevent_zee_QGSP_FTFP_BERT_EML.root')
0055 )
0056 
0057 process.generation_step = cms.Path(process.pgen)
0058 process.simulation_step = cms.Path(process.psim)
0059 process.analysis_step   = cms.Path(process.CaloSimHitStudy)
0060 process.out_step = cms.EndPath(process.output)
0061 
0062 process.generator.pythiaHepMCVerbosity = False
0063 process.generator.pythiaPylistVerbosity = 0
0064 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_FTFP_BERT_EML'
0065 
0066 # process.g4SimHits.ECalSD.IgnoreTrackID      = True
0067 # process.g4SimHits.HCalSD.IgnoreTrackID      = True
0068 # process.g4SimHits.ECalSD.TimeSliceUnit      = 5
0069 # process.g4SimHits.HCalSD.TimeSliceUnit      = 5
0070 
0071 # process.g4SimHits.HCalSD.UseShowerLibrary   = True
0072 # process.g4SimHits.HCalSD.UseParametrize     = False
0073 # process.g4SimHits.HCalSD.UsePMTHits         = False
0074 # process.g4SimHits.HCalSD.UseFibreBundleHits = False
0075 # process.g4SimHits.HFShower.UseShowerLibrary = False
0076 # process.g4SimHits.HFShower.UseHFGflash      = True
0077 # process.g4SimHits.HFShower.TrackEM          = False
0078 # process.g4SimHits.HFShower.OnlyLong         = True
0079 # process.g4SimHits.HFShower.EminLibrary      = 0.0
0080 
0081 # Schedule definition
0082 process.schedule = cms.Schedule(process.generation_step,
0083                                 process.simulation_step,
0084                                 process.analysis_step,
0085                                 process.out_step
0086                                 )
0087 
0088 # filter all path with the production filter sequence 
0089 for path in process.paths:
0090         getattr(process,path)._seq = process.generator * getattr(process,path)._seq