Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-02 04:38:43

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0004 process = cms.Process("HFTEST",Run2_2018)
0005 
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 
0008 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0009 
0010 process.load('Configuration.StandardSequences.Generator_cff')
0011 
0012 #--- Magnetic Field         
0013 process.load("Configuration.StandardSequences.MagneticField_cff")
0014 
0015 #--- Full geometry or only HCAL+ECAL Geometry
0016 #   include "Geometry/CMSCommonData/data/cmsIdealGeometryXML.cfi"
0017 #   include "Geometry/TrackerNumberingBuilder/data/trackerNumberingGeometry.cfi"
0018 process.load("Geometry.CMSCommonData.ecalhcalGeometryXML_cfi")
0019 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0020 process.load("Geometry.HcalCommonData.hcalDDConstants_cff")
0021 
0022 process.load("SimG4Core.Application.g4SimHits_cfi")
0023 
0024 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0025 from Configuration.AlCa.autoCond import autoCond
0026 process.GlobalTag.globaltag = autoCond['run2_mc']
0027 
0028 process.maxEvents = cms.untracked.PSet(
0029     input = cms.untracked.int32(1000)
0030 )
0031 
0032 process.Timing = cms.Service("Timing")
0033 
0034 process.load("IOMC.RandomEngine.IOMC_cff")
0035 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0036 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0037 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0038 process.rndmStore = cms.EDProducer("RandomEngineStateProducer")
0039 
0040 process.source = cms.Source("EmptySource")
0041 
0042 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0043     PGunParameters = cms.PSet(
0044         PartID = cms.vint32(11, 211),
0045         MinEta = cms.double(3.02),
0046         MaxEta = cms.double(5.10),
0047         MinPhi = cms.double(-3.14159265359),
0048         MaxPhi = cms.double(3.14159265359),
0049         MinE   = cms.double(1000.0),
0050         MaxE   = cms.double(5000.0)
0051     ),
0052     AddAntiParticle = cms.bool(False),
0053     Verbosity       = cms.untracked.int32(0),
0054     firstRun        = cms.untracked.uint32(1)
0055 )
0056 
0057 process.VtxSmeared = cms.EDProducer("GaussEvtVtxGenerator",
0058     MeanX = cms.double(0.0),
0059     MeanY = cms.double(0.0),
0060     MeanZ = cms.double(0.0),
0061     SigmaY = cms.double(0.0001),
0062     SigmaX = cms.double(0.0001),
0063     SigmaZ = cms.double(0.0001),
0064     TimeOffset = cms.double(0.0),
0065     src = cms.InputTag("generator","unsmeared")
0066 )
0067 
0068 process.o1 = cms.OutputModule("PoolOutputModule",
0069     fileName = cms.untracked.string('HF_test_ecalplushcalonly_nofield.root')
0070 )
0071 
0072 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits)
0073 process.outpath = cms.EndPath(process.o1)
0074 process.MessageLogger.cerr.default.limit = 100
0075 process.g4SimHits.UseMagneticField = False
0076 process.g4SimHits.OnlySDs = ['EcalSensitiveDetector', 'CaloTrkProcessing', 'HcalSensitiveDetector']
0077 
0078