File indexing completed on 2024-04-06 12:29:57
0001
0002
0003
0004
0005
0006
0007 import FWCore.ParameterSet.Config as cms
0008 import os, sys, imp, re
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010
0011
0012
0013 options = VarParsing.VarParsing('standard')
0014 options.register('geometry',
0015 "V18",
0016 VarParsing.VarParsing.multiplicity.singleton,
0017 VarParsing.VarParsing.varType.string,
0018 "geometry of operations: V17Shift, V18")
0019
0020
0021
0022 options.parseArguments()
0023 print(options)
0024
0025
0026
0027 if (options.geometry == "V18"):
0028 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0029 process = cms.Process("PROD",Phase2C22I13M9)
0030 else:
0031 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0032 process = cms.Process("PROD",Phase2C17I13M9)
0033
0034 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
0035 print("Geometry file: ", geomFile)
0036
0037 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0038 process.load('Configuration.StandardSequences.Generator_cff')
0039 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0040 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0041 process.load('Configuration.StandardSequences.SimIdeal_cff')
0042 process.load(geomFile)
0043 process.load("Configuration.StandardSequences.MagneticField_cff")
0044 process.load("Configuration.EventContent.EventContent_cff")
0045 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0046 from Configuration.AlCa.GlobalTag import GlobalTag
0047 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0048
0049 if hasattr(process,'MessageLogger'):
0050 process.MessageLogger.G4cout = dict()
0051 process.MessageLogger.G4cerr = dict()
0052 process.MessageLogger.HGCSim = dict()
0053 process.MessageLogger.CaloSim = dict()
0054
0055 process.load("IOMC.RandomEngine.IOMC_cff")
0056 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0057 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0058 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0059
0060 process.Timing = cms.Service("Timing")
0061
0062 process.maxEvents = cms.untracked.PSet(
0063 input = cms.untracked.int32(100)
0064 )
0065
0066 process.source = cms.Source("EmptySource",
0067 firstRun = cms.untracked.uint32(1),
0068 firstEvent = cms.untracked.uint32(1)
0069 )
0070
0071 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0072 PGunParameters = cms.PSet(
0073 PartID = cms.vint32(211),
0074 MinEta = cms.double(1.75),
0075 MaxEta = cms.double(2.50),
0076 MinPhi = cms.double(-3.1415926),
0077 MaxPhi = cms.double(3.1415926),
0078 MinE = cms.double(100.00),
0079 MaxE = cms.double(100.00)
0080 ),
0081 Verbosity = cms.untracked.int32(0),
0082 AddAntiParticle = cms.bool(False)
0083 )
0084
0085 process.output = cms.OutputModule("PoolOutputModule",
0086 process.FEVTSIMEventContent,
0087 fileName = cms.untracked.string('hgcV14.root')
0088 )
0089
0090 process.generation_step = cms.Path(process.pgen)
0091 process.simulation_step = cms.Path(process.psim)
0092 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0093 process.out_step = cms.EndPath(process.output)
0094
0095 process.g4SimHits.Physics.type = 'SimG4Core/Physics/QGSP_FTFP_BERT_EML'
0096 process.g4SimHits.Physics.DefaultCutValue = 0.1
0097
0098
0099 process.schedule = cms.Schedule(process.generation_step,
0100 process.simulation_step,
0101 process.out_step
0102 )
0103
0104
0105 for path in process.paths:
0106 getattr(process,path)._seq = process.generator * getattr(process,path)._seq