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