File indexing completed on 2024-04-06 12:15:06
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 "V17",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "type of operations: V16, V17, V17n, V18")
0020
0021
0022 options.parseArguments()
0023 print(options)
0024
0025 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0026 if (options.type == "V18"):
0027 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0028 process = cms.Process("HGCalTest",Phase2C12213M9,dd4hep)
0029 else:
0030 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0031 process = cms.Process("HGCalTest",Phase2C17I13M9,dd4hep)
0032
0033 geomFile = "Geometry/HGCalCommonData/data/dd4hep/testHGCal" + options.type + ".xml"
0034 outFile = "file:step1" + options.type + "DD4hep.root"
0035 print("Geometry file: ", geomFile)
0036 print("Output file: ", outFile)
0037
0038
0039 process.load('Configuration.Geometry.GeometryDD4hep_cff')
0040 process.DDDetectorESProducer.confGeomXMLFiles = geomFile
0041
0042 process.load('Configuration.StandardSequences.Services_cff')
0043 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0044 process.load('FWCore.MessageService.MessageLogger_cfi')
0045 process.load('Configuration.EventContent.EventContent_cff')
0046 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0047 process.load('Geometry.EcalCommonData.ecalSimulationParameters_cff')
0048 process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff')
0049 process.load('Geometry.HGCalCommonData.hgcalParametersInitialization_cfi')
0050 process.load('Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi')
0051 process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff')
0052 process.load('SLHCUpgradeSimulations.Geometry.fakePhase2OuterTrackerConditions_cff')
0053 process.load('Geometry.MuonNumbering.muonGeometryConstants_cff')
0054 process.load('Geometry.MuonNumbering.muonOffsetESProducer_cff')
0055 process.load('Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff')
0056 process.load('Configuration.StandardSequences.MagneticField_cff')
0057 process.load('Configuration.StandardSequences.Generator_cff')
0058 process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi')
0059 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0060 process.load('Configuration.StandardSequences.SimIdeal_cff')
0061 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0062 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0063
0064 if 'MessageLogger' in process.__dict__:
0065 process.MessageLogger.HGCSim=dict()
0066
0067
0068 process.maxEvents = cms.untracked.PSet(
0069 input = cms.untracked.int32(100),
0070 output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0071 )
0072
0073 process.Timing = cms.Service("Timing")
0074
0075
0076 process.source = cms.Source("EmptySource")
0077
0078 process.options = cms.untracked.PSet(
0079 IgnoreCompletely = cms.untracked.vstring(),
0080 Rethrow = cms.untracked.vstring(),
0081 TryToContinue = cms.untracked.vstring(),
0082 allowUnscheduled = cms.obsolete.untracked.bool,
0083 canDeleteEarly = cms.untracked.vstring(),
0084 deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
0085 emptyRunLumiMode = cms.obsolete.untracked.string,
0086 eventSetup = cms.untracked.PSet(
0087 forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0088 allowAnyLabel_=cms.required.untracked.uint32
0089 ),
0090 numberOfConcurrentIOVs = cms.untracked.uint32(1)
0091 ),
0092 fileMode = cms.untracked.string('FULLMERGE'),
0093 forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0094 makeTriggerResults = cms.obsolete.untracked.bool,
0095 numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0096 numberOfConcurrentRuns = cms.untracked.uint32(1),
0097 numberOfStreams = cms.untracked.uint32(0),
0098 numberOfThreads = cms.untracked.uint32(1),
0099 printDependencies = cms.untracked.bool(False),
0100 sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0101 throwIfIllegalParameter = cms.untracked.bool(True),
0102 wantSummary = cms.untracked.bool(False)
0103 )
0104
0105
0106 process.configurationMetadata = cms.untracked.PSet(
0107 annotation = cms.untracked.string('single pi E 1000'),
0108 name = cms.untracked.string('Applications'),
0109 version = cms.untracked.string('$Revision: 1.19 $')
0110 )
0111
0112
0113
0114 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0115 SelectEvents = cms.untracked.PSet(
0116 SelectEvents = cms.vstring('generation_step')
0117 ),
0118 dataset = cms.untracked.PSet(
0119 dataTier = cms.untracked.string('GEN-SIM'),
0120 filterName = cms.untracked.string('')
0121 ),
0122 fileName = cms.untracked.string(outFile),
0123 outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0124 splitLevel = cms.untracked.int32(0)
0125 )
0126
0127
0128
0129
0130 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0131 from Configuration.AlCa.GlobalTag import GlobalTag
0132 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0133
0134 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0135 PGunParameters = cms.PSet(
0136 PartID = cms.vint32(211),
0137 MinEta = cms.double(1.48),
0138 MaxEta = cms.double(3.01),
0139 MinPhi = cms.double(-3.14159265359),
0140 MaxPhi = cms.double(3.14159265359),
0141 MinE = cms.double(999.99),
0142 MaxE = cms.double(1000.01)
0143 ),
0144 Verbosity = cms.untracked.int32(0),
0145 psethack = cms.string('single pi E 1000'),
0146 AddAntiParticle = cms.bool(True),
0147 firstRun = cms.untracked.uint32(1)
0148 )
0149
0150 process.ProductionFilterSequence = cms.Sequence(process.generator)
0151
0152
0153 process.generation_step = cms.Path(process.pgen)
0154 process.simulation_step = cms.Path(process.psim)
0155 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0156 process.endjob_step = cms.EndPath(process.endOfProcess)
0157 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0158
0159
0160 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
0161 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0162 associatePatAlgosToolsTask(process)
0163
0164 for path in process.paths:
0165 getattr(process,path).insert(0, process.ProductionFilterSequence)
0166
0167
0168
0169
0170
0171
0172 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0173 process = customiseEarlyDelete(process)
0174