File indexing completed on 2024-04-30 04:10:44
0001
0002
0003
0004
0005
0006
0007
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, importlib, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011
0012
0013
0014 options = VarParsing.VarParsing('standard')
0015 options.register('geometry',
0016 "2024",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "geometry of operations: 2021, 2023, 2024")
0020
0021
0022 options.parseArguments()
0023
0024 print(options)
0025
0026
0027
0028
0029 geomFile = "Configuration.Geometry.GeometryExtended" + options.geometry + "Reco_cff"
0030 from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0031 process = cms.Process('PrintSensitive',Run3_DDD)
0032
0033 print("Geometry file: ", geomFile)
0034
0035 process.load(geomFile)
0036 process.load('FWCore.MessageService.MessageLogger_cfi')
0037
0038 process.MessageLogger.G4cout=dict()
0039
0040 process.maxEvents = cms.untracked.PSet(
0041 input = cms.untracked.int32(1)
0042 )
0043
0044 process.load('SimGeneral.HepPDTESSource.pdt_cfi')
0045 process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
0046 process.load('GeneratorInterface.Core.generatorSmeared_cfi')
0047
0048 process.source = cms.Source("EmptySource")
0049
0050 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0051 PGunParameters = cms.PSet(
0052 PartID = cms.vint32(13),
0053 MinEta = cms.double(-2.5),
0054 MaxEta = cms.double(2.5),
0055 MinPhi = cms.double(-3.14159265359),
0056 MaxPhi = cms.double(3.14159265359),
0057 MinPt = cms.double(9.99),
0058 MaxPt = cms.double(10.01)
0059 ),
0060 AddAntiParticle = cms.bool(False),
0061 Verbosity = cms.untracked.int32(0),
0062 firstRun = cms.untracked.uint32(1)
0063 )
0064
0065 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0066 generator = cms.PSet(
0067 initialSeed = cms.untracked.uint32(123456789),
0068 engineName = cms.untracked.string('HepJamesRandom')
0069 ),
0070 VtxSmeared = cms.PSet(
0071 engineName = cms.untracked.string('HepJamesRandom'),
0072 initialSeed = cms.untracked.uint32(98765432)
0073 ),
0074 g4SimHits = cms.PSet(
0075 initialSeed = cms.untracked.uint32(11),
0076 engineName = cms.untracked.string('HepJamesRandom')
0077 )
0078 )
0079
0080 process.load('SimG4Core.Application.g4SimHits_cfi')
0081
0082 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits)
0083
0084 process.g4SimHits.UseMagneticField = False
0085 process.g4SimHits.Physics.DefaultCutValue = 10.
0086 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0087 Name = cms.string('*'),
0088 DD4Hep = cms.bool(False),
0089 type = cms.string('PrintSensitive')
0090 ))