11 import FWCore.ParameterSet.Config
as cms
12 import os, sys, imp, re, random
13 import FWCore.ParameterSet.VarParsing
as VarParsing
18 options.register(
'geometry',
20 VarParsing.VarParsing.multiplicity.singleton,
21 VarParsing.VarParsing.varType.string,
22 "geometry of operations: D88, D92, D93, V17Shift, V18")
23 options.register(
'type',
25 VarParsing.VarParsing.multiplicity.singleton,
26 VarParsing.VarParsing.varType.string,
27 "type of operations: DDD, DD4hep")
28 options.register(
'data',
30 VarParsing.VarParsing.multiplicity.singleton,
31 VarParsing.VarParsing.varType.string,
32 "data of operations: mu, tt")
33 options.register(
'tag',
35 VarParsing.VarParsing.multiplicity.singleton,
36 VarParsing.VarParsing.varType.string,
37 "tag of operations: Def, Thr, 0Noise")
39 options.parseArguments()
45 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
46 if (options.type ==
"DD4hep"):
47 from Configuration.ProcessModifiers.dd4hep_cff
import dd4hep
48 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9,dd4hep)
49 if (options.geometry ==
"V17Shift"):
50 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 51 elif (options.geometry ==
"V18"):
52 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 54 geomFile =
"Configuration.Geometry.Geometry" + options.type +
"Extended2026" + options.geometry +
"Reco_cff" 56 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9)
57 if (options.geometry ==
"V17Shift"):
58 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 59 elif (options.geometry ==
"V18"):
60 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 62 geomFile =
"Configuration.Geometry.GeometryExtended2026" + options.geometry +
"Reco_cff" 63 globalTag =
"auto:phase2_realistic_T21" 64 inFile =
"file:step2" + options.type + options.geometry + options.data +
".root" 65 outFile =
"file:step3" + options.type + options.geometry + options.data +
".root" 66 fileName =
"missing" + options.type + options.geometry + options.data + options.tag +
".root" 68 print(
"Geometry file: ", geomFile)
69 print(
"Global Tag: ", globalTag)
70 print(
"Input file: ", inFile)
71 print(
"Output file: ", outFile)
72 print(
"Root file: ", fileName)
75 process.load(
'Configuration.StandardSequences.Services_cff')
76 process.load(
'SimGeneral.HepPDTESSource.pythiapdt_cfi')
77 process.load(
'FWCore.MessageService.MessageLogger_cfi')
78 process.load(
'Configuration.EventContent.EventContent_cff')
79 process.load(
'SimGeneral.MixingModule.mixNoPU_cfi')
80 process.load(geomFile)
81 process.load(
'Configuration.StandardSequences.MagneticField_cff')
82 process.load(
'Configuration.StandardSequences.RawToDigi_cff')
83 process.load(
'Configuration.StandardSequences.Reconstruction_cff')
84 process.load(
'Configuration.StandardSequences.RecoSim_cff')
85 process.load(
'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
86 process.load(
'Validation.HGCalValidation.hgcMissingRecHit_cfi')
88 process.MessageLogger.cerr.FwkReport.reportEvery = 1
89 if hasattr(process,
'MessageLogger'):
90 process.MessageLogger.HGCalMiss=dict()
91 process.MessageLogger.HGCalError=dict()
93 process.maxEvents = cms.untracked.PSet(
94 input = cms.untracked.int32(-1),
95 output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
99 process.source = cms.Source(
"PoolSource",
100 fileNames = cms.untracked.vstring(inFile),
101 secondaryFileNames = cms.untracked.vstring()
104 process.options = cms.untracked.PSet(
105 FailPath = cms.untracked.vstring(),
106 IgnoreCompletely = cms.untracked.vstring(),
107 Rethrow = cms.untracked.vstring(),
108 SkipEvent = cms.untracked.vstring(),
109 accelerators = cms.untracked.vstring(
'*'),
110 allowUnscheduled = cms.obsolete.untracked.bool,
111 canDeleteEarly = cms.untracked.vstring(),
112 deleteNonConsumedUnscheduledModules = cms.untracked.bool(
True),
113 dumpOptions = cms.untracked.bool(
False),
114 emptyRunLumiMode = cms.obsolete.untracked.string,
115 eventSetup = cms.untracked.PSet(
116 forceNumberOfConcurrentIOVs = cms.untracked.PSet(
117 allowAnyLabel_=cms.required.untracked.uint32
119 numberOfConcurrentIOVs = cms.untracked.uint32(0)
121 fileMode = cms.untracked.string(
'FULLMERGE'),
122 forceEventSetupCacheClearOnNewRun = cms.untracked.bool(
False),
123 makeTriggerResults = cms.obsolete.untracked.bool,
124 numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
125 numberOfConcurrentRuns = cms.untracked.uint32(1),
126 numberOfStreams = cms.untracked.uint32(0),
127 numberOfThreads = cms.untracked.uint32(1),
128 printDependencies = cms.untracked.bool(
False),
129 sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
130 throwIfIllegalParameter = cms.untracked.bool(
True),
131 wantSummary = cms.untracked.bool(
False)
135 process.configurationMetadata = cms.untracked.PSet(
136 annotation = cms.untracked.string(
'step3 nevts:10'),
137 name = cms.untracked.string(
'Applications'),
138 version = cms.untracked.string(
'$Revision: 1.19 $')
143 process.FEVTDEBUGHLToutput = cms.OutputModule(
"PoolOutputModule",
144 dataset = cms.untracked.PSet(
145 dataTier = cms.untracked.string(
'GEN-SIM-RECO'),
146 filterName = cms.untracked.string(
'')
148 fileName = cms.untracked.string(outFile),
149 outputCommands = cms.untracked.vstring(
151 'keep *_g4SimHits_*_*',
154 splitLevel = cms.untracked.int32(0)
158 process.TFileService = cms.Service(
"TFileService",
159 fileName = cms.string(fileName),
160 closeFileFast = cms.untracked.bool(
True) )
163 process.mix.playback =
True 164 process.mix.digitizers = cms.PSet()
165 for a
in process.aliases: delattr(process, a)
166 process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string(
"randomEngineStateProducer")
167 from Configuration.AlCa.GlobalTag
import GlobalTag
168 process.GlobalTag =
GlobalTag(process.GlobalTag, globalTag,
'')
171 process.raw2digi_step = cms.Path(process.RawToDigi)
172 process.reconstruction_step = cms.Path(process.reconstruction)
173 process.recosim_step = cms.Path(process.recosim)
174 process.analysis_step = cms.Path(process.hgcMissingRecHit)
175 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
178 process.schedule = cms.Schedule(process.raw2digi_step,
179 process.reconstruction_step,
180 process.recosim_step,
181 process.analysis_step,
182 process.FEVTDEBUGHLToutput_step)
187 from SimGeneral.MixingModule.fullMixCustomize_cff
import setCrossingFrameOn
195 from Configuration.StandardSequences.earlyDeleteSettings_cff
import customiseEarlyDelete
def customiseEarlyDelete(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def setCrossingFrameOn(process)