Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("SimHitStudy")
0004 process.load("SimG4CMS.Calo.HOSimHitStudy_cfi")
0005 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0006 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0007 process.load("Geometry.CMSCommonData.cmsSimIdealGeometryXML_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['run1_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(50000)
0028 )
0029 
0030 process.MessageLogger = cms.Service("MessageLogger",
0031     destinations = cms.untracked.vstring('cout'),
0032     categories = cms.untracked.vstring('FwkJob', 'HitStudy'),
0033     debugModules = cms.untracked.vstring('*'),
0034     cout = cms.untracked.PSet(
0035         threshold = cms.untracked.string('DEBUG'),
0036         default = cms.untracked.PSet(
0037             limit = cms.untracked.int32(0)
0038         ),
0039         HitStudy = cms.untracked.PSet(
0040             limit = cms.untracked.int32(0)
0041         ),
0042         FwkJob = cms.untracked.PSet(
0043             limit = cms.untracked.int32(-1)
0044         )
0045     )
0046 )
0047 
0048 #process.Timing = cms.Service("Timing")
0049 
0050 process.source = cms.Source("EmptySource",
0051     firstRun        = cms.untracked.uint32(1),
0052     firstEvent      = cms.untracked.uint32(1)
0053 )
0054 
0055 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0056     PGunParameters = cms.PSet(
0057         PartID = cms.vint32(13),
0058         MinEta = cms.double(-1.305),
0059         MaxEta = cms.double(1.305),
0060         MinPhi = cms.double(-3.14159265359),
0061         MaxPhi = cms.double(3.14159265359),
0062         MinE   = cms.double(150.),
0063         MaxE   = cms.double(150.)
0064     ),
0065     Verbosity       = cms.untracked.int32(0),
0066     AddAntiParticle = cms.bool(False)
0067 )
0068 
0069 process.TFileService = cms.Service("TFileService",
0070     fileName = cms.string('simHitStudy_150.root')
0071 )
0072 
0073 process.g4SimHits.HCalSD.TestNumberingScheme = True
0074 process.HOSimHitStudy.TestNumbering          = True
0075 process.HOSimHitStudy.PrintExcessEnergy      = False
0076 process.HOSimHitStudy.MaxEnergy = 10.0
0077 process.HOSimHitStudy.ScaleEB   = 1.02
0078 process.HOSimHitStudy.ScaleHB   = 104.4
0079 process.HOSimHitStudy.ScaleHO   = 2.33
0080 
0081 process.generation_step = cms.Path(process.pgen)
0082 process.simulation_step = cms.Path(process.psim)
0083 process.analysis_step   = cms.Path(process.HOSimHitStudy)
0084 
0085 # Schedule definition 
0086 process.schedule = cms.Schedule(process.generation_step,
0087                                 process.simulation_step,
0088                                 process.analysis_step
0089                                 )
0090 
0091 # filter all path with the production filter sequence
0092 for path in process.paths:
0093         getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0094 
0095