Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:16

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 process.load("FWCore.MessageService.MessageLogger_cfi")
0005 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0006 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0007 process.load("Configuration.Geometry.GeometryExtended2017_cff")
0008 process.load("Configuration.Geometry.GeometryExtended2017Reco_cff")
0009 process.load("Configuration.StandardSequences.MagneticField_cff")
0010 process.load("Configuration.EventContent.EventContent_cff")
0011 process.load('Configuration.StandardSequences.Generator_cff')
0012 process.load('Configuration.StandardSequences.SimIdeal_cff')
0013 process.load("SimG4CMS.Calo.EcalSimHitStudy_cfi")
0014 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0015 from Configuration.AlCa.autoCond import autoCond
0016 process.GlobalTag.globaltag = autoCond['run2_mc']
0017 
0018 #
0019 #    
0020 
0021 
0022 process.load("IOMC.RandomEngine.IOMC_cff")
0023 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0024 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0025 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0026 
0027 process.maxEvents = cms.untracked.PSet(
0028     input = cms.untracked.int32(10000)
0029 )
0030 
0031 process.source = cms.Source("EmptySource",
0032     firstRun        = cms.untracked.uint32(1),
0033     firstEvent      = cms.untracked.uint32(1)
0034 )
0035 
0036 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0037     PGunParameters = cms.PSet(
0038         PartID = cms.vint32(11),
0039         MinEta = cms.double(-2.9),
0040         MaxEta = cms.double(2.9),
0041         MinPhi = cms.double(-3.14159265359),
0042         MaxPhi = cms.double(3.14159265359),
0043         MinE   = cms.double(10.0),
0044         MaxE   = cms.double(10.0)
0045     ),
0046     Verbosity       = cms.untracked.int32(0),
0047     AddAntiParticle = cms.bool(False)
0048 )
0049 
0050 process.TFileService = cms.Service("TFileService",
0051     fileName = cms.string('electron10.root')
0052 )
0053 
0054 process.g4SimHits.ECalSD.StoreRadLength  = True
0055 
0056 process.EcalSimHitStudy.MaxEnergy = 15.0
0057 
0058 process.EcalSimHitStudyNormal = process.EcalSimHitStudy.clone(
0059     MaxEnergy  = 15.0,
0060     SelectX    = 0)
0061 
0062 process.EcalSimHitStudyReflect = process.EcalSimHitStudy.clone(
0063     MaxEnergy  = 15.0,
0064     SelectX    = 1)
0065 
0066 
0067 process.generation_step = cms.Path(process.pgen)
0068 process.simulation_step = cms.Path(process.psim)
0069 process.analysis_step   = cms.Path(process.EcalSimHitStudy*
0070                    process.EcalSimHitStudyNormal*
0071                    process.EcalSimHitStudyReflect)
0072 
0073 
0074 # Schedule definition
0075 process.schedule = cms.Schedule(process.generation_step,
0076                                 process.simulation_step,
0077                                 process.analysis_step,
0078                                 )
0079 
0080 # filter all path with the production filter sequence
0081 for path in process.paths:
0082         getattr(process,path)._seq = process.generator * getattr(process,path)._seq