File indexing completed on 2024-11-06 06:06:57
0001
0002
0003
0004
0005
0006
0007
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, imp, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011
0012
0013
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016 "V18",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "type of operations: V16, V17, V17Shift, V18")
0020
0021
0022 options.parseArguments()
0023 print(options)
0024
0025 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0026
0027 process = cms.Process("HGCalParametersTest",Phase2C17I13M9)
0028
0029 if (options.type == "V18"):
0030 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "Reco_cff"
0031 elif (options.type == "V17Shift"):
0032 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "Reco_cff"
0033 elif (options.type == "V17"):
0034 geomFile = "Configuration.Geometry.GeometryExtendedRun4D110Reco_cff"
0035 else:
0036 geomFile = "Configuration.Geometry.GeometryExtendedRun4D100Reco_cff"
0037
0038 outFile = "minbias" + options.type + ".root"
0039
0040 print("Geometry file: ", geomFile)
0041 print("Output file: ", outFile)
0042
0043 process.load("SimG4CMS.Calo.PythiaMinBias_cfi")
0044 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0045 process.load('FWCore.MessageService.MessageLogger_cfi')
0046 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0047 process.load(geomFile)
0048 process.load("Configuration.StandardSequences.MagneticField_cff")
0049 process.load("Configuration.EventContent.EventContent_cff")
0050 process.load('Configuration.StandardSequences.Generator_cff')
0051 process.load('Configuration.StandardSequences.SimIdeal_cff')
0052
0053 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0054 from Configuration.AlCa.GlobalTag import GlobalTag
0055 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0056
0057 if 'MessageLogger' in process.__dict__:
0058 process.MessageLogger.G4cerr=dict()
0059 process.MessageLogger.HGCSim=dict()
0060
0061 process.source = cms.Source("EmptySource")
0062
0063 process.maxEvents = cms.untracked.PSet(
0064 input = cms.untracked.int32(10)
0065 )
0066
0067 process.Timing = cms.Service("Timing")
0068
0069 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0070 oncePerEventMode = cms.untracked.bool(True),
0071 showMallocInfo = cms.untracked.bool(True),
0072 dump = cms.untracked.bool(True),
0073 ignoreTotal = cms.untracked.int32(1)
0074 )
0075
0076 process.load("IOMC.RandomEngine.IOMC_cff")
0077 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0078 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0079 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0080 process.rndmStore = cms.EDProducer("RandomEngineStateProducer")
0081
0082
0083 process.output = cms.OutputModule("PoolOutputModule",
0084 process.FEVTSIMEventContent,
0085 fileName = cms.untracked.string(outFile)
0086 )
0087
0088 process.generation_step = cms.Path(process.pgen)
0089 process.simulation_step = cms.Path(process.psim)
0090 process.out_step = cms.EndPath(process.output)
0091
0092 process.generator.pythiaHepMCVerbosity = False
0093 process.generator.pythiaPylistVerbosity = 0
0094 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0095
0096
0097
0098 process.schedule = cms.Schedule(process.generation_step,
0099 process.simulation_step,
0100 process.out_step
0101 )
0102
0103
0104 for path in process.paths:
0105 getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0106