9 import FWCore.ParameterSet.Config
as cms
10 import os, sys, imp, re, random
11 import FWCore.ParameterSet.VarParsing
as VarParsing
16 options.register(
'geometry',
18 VarParsing.VarParsing.multiplicity.singleton,
19 VarParsing.VarParsing.varType.string,
20 "geometry of operations: D88, D92, D93, V17Shift, V18")
21 options.register(
'type',
23 VarParsing.VarParsing.multiplicity.singleton,
24 VarParsing.VarParsing.varType.string,
25 "type of operations: DDD, DD4hep")
28 options.parseArguments()
35 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
36 if (options.type ==
"DD4hep"):
37 from Configuration.ProcessModifiers.dd4hep_cff
import dd4hep
38 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9,dd4hep)
39 if (options.geometry ==
"V17Shift"):
40 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 41 elif (options.geometry ==
"V18"):
42 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 44 geomFile =
"Configuration.Geometry.Geometry" + options.type +
"Extended2026" + options.geometry +
"Reco_cff" 46 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9)
47 if (options.geometry ==
"V17Shift"):
48 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 49 elif (options.geometry ==
"V18"):
50 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 52 geomFile =
"Configuration.Geometry.GeometryExtended2026" + options.geometry +
"Reco_cff" 54 globalTag =
"auto:phase2_realistic_T21" 55 outFile =
"file:step1" + options.type + options.geometry +
"mu.root" 57 print(
"Geometry file: ", geomFile)
58 print(
"Global Tag: ", globalTag)
59 print(
"Output file: ", outFile)
62 process.load(geomFile)
63 process.load(
'Configuration.StandardSequences.Services_cff')
64 process.load(
'SimGeneral.HepPDTESSource.pythiapdt_cfi')
65 process.load(
'FWCore.MessageService.MessageLogger_cfi')
66 process.load(
'Configuration.EventContent.EventContent_cff')
67 process.load(
'SimGeneral.MixingModule.mixNoPU_cfi')
68 process.load(
'Configuration.StandardSequences.MagneticField_cff')
69 process.load(
'Configuration.StandardSequences.Generator_cff')
70 process.load(
'IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollision_cfi')
71 process.load(
'GeneratorInterface.Core.genFilterSummary_cff')
72 process.load(
'Configuration.StandardSequences.SimIdeal_cff')
73 process.load(
'Configuration.StandardSequences.EndOfProcess_cff')
74 process.load(
'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
75 process.load(
'Configuration.StandardSequences.EndOfProcess_cff')
76 process.load(
'SimG4CMS.Calo.hgcalHitPartial_cff')
77 process.load(
"IOMC.RandomEngine.IOMC_cff")
79 rndm = random.randint(0,200000)
80 process.RandomNumberGeneratorService.generator.initialSeed = rndm
81 print(
"Processing with random number seed: ", rndm)
83 process.maxEvents = cms.untracked.PSet(
84 input = cms.untracked.int32(5000)
87 process.MessageLogger.cerr.FwkReport.reportEvery = 1
88 if hasattr(process,
'MessageLogger'):
89 process.MessageLogger.HGCalError=dict()
94 process.source = cms.Source(
"EmptySource")
96 process.options = cms.untracked.PSet(
97 wantSummary = cms.untracked.bool(
True),
98 numberOfConcurrentRuns = cms.untracked.uint32(1),
99 numberOfStreams = cms.untracked.uint32(0),
100 numberOfThreads = cms.untracked.uint32(1),
101 printDependencies = cms.untracked.bool(
False),
102 sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
106 process.configurationMetadata = cms.untracked.PSet(
107 version = cms.untracked.string(
''),
108 annotation = cms.untracked.string(
''),
109 name = cms.untracked.string(
'Applications')
113 process.output = cms.OutputModule(
"PoolOutputModule",
114 SelectEvents = cms.untracked.PSet(
115 SelectEvents = cms.vstring(
'generation_step')
117 dataset = cms.untracked.PSet(
118 filterName = cms.untracked.string(
''),
119 dataTier = cms.untracked.string(
'GEN-SIM-DIGI-RAW-RECO')
121 fileName = cms.untracked.string(outFile),
122 outputCommands = process.FEVTDEBUGEventContent.outputCommands,
123 eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
124 splitLevel = cms.untracked.int32(0)
130 process.genstepfilter.triggerConditions=cms.vstring(
"generation_step")
131 from Configuration.AlCa.GlobalTag
import GlobalTag
132 process.GlobalTag =
GlobalTag(process.GlobalTag, globalTag,
'')
134 process.generator = cms.EDFilter(
"Pythia8PtGun",
135 PGunParameters = cms.PSet(
136 MaxPt = cms.double(100.01),
137 MinPt = cms.double(99.99),
138 ParticleID = cms.vint32(-13),
139 AddAntiParticle = cms.bool(
True),
140 MaxEta = cms.double(3.1),
141 MaxPhi = cms.double(3.14159265359),
142 MinEta = cms.double(2.8),
143 MinPhi = cms.double(-3.14159265359)
145 Verbosity = cms.untracked.int32(0),
146 psethack = cms.string(
'single mu pt 100'),
147 firstRun = cms.untracked.uint32(1),
148 PythiaParameters = cms.PSet(parameterSets = cms.vstring())
153 process.ProductionFilterSequence = cms.Sequence(process.generator)
155 process.g4SimHits.HGCSD.CheckID =
True 156 process.g4SimHits.HGCScintSD.CheckID =
True 159 process.generation_step = cms.Path(process.pgen)
160 process.simulation_step = cms.Path(process.psim)
161 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
162 process.endjob_step = cms.EndPath(process.endOfProcess)
163 process.analysis_step = cms.Path(process.hgcalHitPartialEE+process.hgcalHitPartialHE+process.hgcalHitPartialHEB)
164 process.out_step = cms.EndPath(process.output)
167 process.schedule = cms.Schedule(process.generation_step,
168 process.genfiltersummary_step,
169 process.simulation_step,
171 process.analysis_step,
178 for path
in process.paths:
179 getattr(process,path).
insert(0, process.ProductionFilterSequence)
185 from Configuration.StandardSequences.earlyDeleteSettings_cff
import customiseEarlyDelete
def customiseEarlyDelete(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
def associatePatAlgosToolsTask(process)