Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-27 14:07:59

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0005 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0006 #process.load("SimG4CMS.Calo.testGeometryPMTXML_cfi")
0007 process.load("Geometry.CMSCommonData.cmsHFPMTAverageXML_cfi")
0008 #process.load("SimG4CMS.Calo.cmsHFPMTXML_cfi")
0009 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0010 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0011 process.load("Geometry.HcalCommonData.hcalDDConstants_cff")
0012 process.load("Geometry.MuonNumbering.muonGeometryConstants_cff")
0013 process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff")
0014 process.load("Configuration.StandardSequences.MagneticField_cff")
0015 process.load("Configuration.EventContent.EventContent_cff")
0016 process.load('Configuration.StandardSequences.Generator_cff')
0017 process.load('Configuration.StandardSequences.SimIdeal_cff')
0018 process.load("SimG4CMS.Calo.HFPMTHitAnalyzer_cfi")
0019 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff"
0020 )
0021 from Configuration.AlCa.autoCond import autoCond
0022 process.GlobalTag.globaltag = autoCond['run1_mc']
0023 
0024 process.MessageLogger = cms.Service("MessageLogger",
0025     destinations = cms.untracked.vstring('cout'),
0026     categories = cms.untracked.vstring('CaloSim', 
0027         'EcalSim', 'G4cerr', 'G4cout',
0028         'HcalSim', 'HFShower'),
0029 #    debugModules = cms.untracked.vstring('*'),
0030     cout = cms.untracked.PSet(
0031 #        threshold = cms.untracked.string('DEBUG'),
0032         INFO = cms.untracked.PSet(
0033             limit = cms.untracked.int32(0)
0034         ),
0035         DEBUG = cms.untracked.PSet(
0036             limit = cms.untracked.int32(0)
0037         ),
0038         CaloSim = cms.untracked.PSet(
0039             limit = cms.untracked.int32(0)
0040         ),
0041         EcalSim = cms.untracked.PSet(
0042             limit = cms.untracked.int32(0)
0043         ),
0044         G4cerr = cms.untracked.PSet(
0045             limit = cms.untracked.int32(0)
0046         ),
0047         G4cout = cms.untracked.PSet(
0048             limit = cms.untracked.int32(0)
0049         ),
0050         HcalSim = cms.untracked.PSet(
0051             limit = cms.untracked.int32(0)
0052         ),
0053         HFShower = cms.untracked.PSet(
0054             limit = cms.untracked.int32(-1)
0055         )
0056     )
0057 )
0058 
0059 process.load("IOMC.RandomEngine.IOMC_cff")
0060 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0061 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0062 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0063 
0064 process.maxEvents = cms.untracked.PSet(
0065     input = cms.untracked.int32(10000)
0066 )
0067 
0068 process.source = cms.Source("EmptySource",
0069     firstRun        = cms.untracked.uint32(1),
0070     firstEvent      = cms.untracked.uint32(1)
0071 )
0072 
0073 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0074     PGunParameters = cms.PSet(
0075         PartID = cms.vint32(211),
0076         MinEta = cms.double(3.5),
0077         MaxEta = cms.double(3.5),
0078         MinPhi = cms.double(-3.1415926),
0079         MaxPhi = cms.double(3.1415926),
0080         MinE   = cms.double(100.00),
0081         MaxE   = cms.double(100.00)
0082     ),
0083     Verbosity       = cms.untracked.int32(0),
0084     AddAntiParticle = cms.bool(False)
0085 )
0086 
0087 # Event output
0088 process.output = cms.OutputModule("PoolOutputModule",
0089     process.FEVTSIMEventContent,
0090     fileName = cms.untracked.string('simevent.root')
0091 )
0092 
0093 process.TFileService = cms.Service("TFileService",
0094     fileName = cms.string('HFPMT0_3.5.root')
0095 )
0096 
0097 process.generation_step = cms.Path(process.pgen)
0098 process.simulation_step = cms.Path(process.psim)
0099 process.analysis_step   = cms.Path(process.HFPMTHitAnalyzer)
0100 process.out_step = cms.EndPath(process.output)
0101 
0102 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_FTFP_BERT_EML'
0103 process.g4SimHits.Physics.DefaultCutValue   = 0.1
0104 process.g4SimHits.HCalSD.UseShowerLibrary   = True
0105 process.g4SimHits.HCalSD.UseParametrize     = False
0106 process.g4SimHits.HCalSD.UsePMTHits         = True
0107 process.g4SimHits.HFShower.UseShowerLibrary = True
0108 process.g4SimHits.HFShower.UseHFGflash      = False
0109 process.g4SimHits.HFShower.TrackEM          = False
0110 process.g4SimHits.HFShower.EminLibrary      = 0.0
0111 process.g4SimHits.HFShower.HFShowerBlock.OnlyLong = cms.bool(True)
0112 process.g4SimHits.HFShower.ApplyFiducialCut = False
0113 process.g4SimHits.HFShowerLibrary.HFLibraryFileBlock.ApplyFiducialCut = cms.bool(False)
0114 
0115 # Schedule definition                                                          
0116 process.schedule = cms.Schedule(process.generation_step,
0117                                 process.simulation_step,
0118                                 process.analysis_step,
0119                                 process.out_step
0120                                 )
0121 
0122 # filter all path with the production filter sequence                          
0123 for path in process.paths:
0124         getattr(process,path)._seq = process.generator * getattr(process,path)._seq