13 import FWCore.ParameterSet.Config
as cms
14 import os, sys, imp, re, random
15 import FWCore.ParameterSet.VarParsing
as VarParsing
20 options.register(
'geometry',
22 VarParsing.VarParsing.multiplicity.singleton,
23 VarParsing.VarParsing.varType.string,
24 "geometry of operations: D88, D92, D93, V17Shift, V18")
25 options.register(
'type',
27 VarParsing.VarParsing.multiplicity.singleton,
28 VarParsing.VarParsing.varType.string,
29 "type of operations: DDD, DD4hep")
30 options.register(
'data',
32 VarParsing.VarParsing.multiplicity.singleton,
33 VarParsing.VarParsing.varType.string,
34 "data of operations: mu, tt")
35 options.register(
'noise',
37 VarParsing.VarParsing.multiplicity.singleton,
38 VarParsing.VarParsing.varType.string,
39 "noise of operations: none, ok")
40 options.register(
'threshold',
42 VarParsing.VarParsing.multiplicity.singleton,
43 VarParsing.VarParsing.varType.string,
44 "threshold of operations: none, ok")
47 options.parseArguments()
53 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
54 if (options.type ==
"DD4hep"):
55 from Configuration.ProcessModifiers.dd4hep_cff
import dd4hep
56 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9,dd4hep)
57 if (options.geometry ==
"V17Shift"):
58 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 59 elif (options.geometry ==
"V18"):
60 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 62 geomFile =
"Configuration.Geometry.Geometry" + options.type +
"Extended2026" + options.geometry +
"Reco_cff" 64 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9)
65 if (options.geometry ==
"V17Shift"):
66 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 67 elif (options.geometry ==
"V18"):
68 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 70 geomFile =
"Configuration.Geometry.GeometryExtended2026" + options.geometry +
"Reco_cff" 72 globalTag =
"auto:phase2_realistic_T21" 73 inFile =
"file:step1" + options.type + options.geometry + options.data +
".root" 74 outFile =
"file:step2" + options.type + options.geometry + options.data +
".root" 76 print(
"Geometry file: ", geomFile)
77 print(
"Global Tag: ", globalTag)
78 print(
"Input file: ", inFile)
79 print(
"Output file: ", outFile)
85 from SimCalorimetry.HGCalSimProducers.hgcROCParameters_cfi
import hgcROCSettings
87 process.load(
'Configuration.StandardSequences.Services_cff')
88 process.load(
'SimGeneral.HepPDTESSource.pythiapdt_cfi')
89 process.load(
'FWCore.MessageService.MessageLogger_cfi')
90 process.load(
'Configuration.EventContent.EventContent_cff')
91 process.load(
'SimGeneral.MixingModule.mixNoPU_cfi')
92 process.load(geomFile)
93 process.load(
'Configuration.StandardSequences.MagneticField_cff')
94 process.load(
'Configuration.StandardSequences.Digi_cff')
95 process.load(
'Configuration.StandardSequences.L1TrackTrigger_cff')
96 process.load(
'Configuration.StandardSequences.SimL1Emulator_cff')
97 process.load(
'Configuration.StandardSequences.DigiToRaw_cff')
98 process.load(
'HLTrigger.Configuration.HLT_Fake2_cff')
99 process.load(
'Configuration.StandardSequences.EndOfProcess_cff')
100 process.load(
'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
102 process.MessageLogger.cerr.FwkReport.reportEvery = 1
104 process.maxEvents = cms.untracked.PSet(
105 input = cms.untracked.int32(-1),
106 output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
110 process.source = cms.Source(
"PoolSource",
111 dropDescendantsOfDroppedBranches = cms.untracked.bool(
False),
112 fileNames = cms.untracked.vstring(inFile),
113 inputCommands = cms.untracked.vstring(
115 'drop *_genParticles_*_*',
116 'drop *_genParticlesForJets_*_*',
117 'drop *_kt4GenJets_*_*',
118 'drop *_kt6GenJets_*_*',
119 'drop *_iterativeCone5GenJets_*_*',
120 'drop *_ak4GenJets_*_*',
121 'drop *_ak7GenJets_*_*',
122 'drop *_ak8GenJets_*_*',
123 'drop *_ak4GenJetsNoNu_*_*',
124 'drop *_ak8GenJetsNoNu_*_*',
125 'drop *_genCandidatesForMET_*_*',
126 'drop *_genParticlesForMETAllVisible_*_*',
127 'drop *_genMetCalo_*_*',
128 'drop *_genMetCaloAndNonPrompt_*_*',
129 'drop *_genMetTrue_*_*',
130 'drop *_genMetIC5GenJs_*_*' 132 secondaryFileNames = cms.untracked.vstring()
135 process.options = cms.untracked.PSet(
136 IgnoreCompletely = cms.untracked.vstring(),
137 Rethrow = cms.untracked.vstring(),
138 TryToContinue = cms.untracked.vstring(),
139 accelerators = cms.untracked.vstring(
'*'),
140 allowUnscheduled = cms.obsolete.untracked.bool,
141 canDeleteEarly = cms.untracked.vstring(),
142 deleteNonConsumedUnscheduledModules = cms.untracked.bool(
True),
143 dumpOptions = cms.untracked.bool(
False),
144 emptyRunLumiMode = cms.obsolete.untracked.string,
145 eventSetup = cms.untracked.PSet(
146 forceNumberOfConcurrentIOVs = cms.untracked.PSet(
147 allowAnyLabel_=cms.required.untracked.uint32
149 numberOfConcurrentIOVs = cms.untracked.uint32(0)
151 fileMode = cms.untracked.string(
'FULLMERGE'),
152 forceEventSetupCacheClearOnNewRun = cms.untracked.bool(
False),
153 makeTriggerResults = cms.obsolete.untracked.bool,
154 numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
155 numberOfConcurrentRuns = cms.untracked.uint32(1),
156 numberOfStreams = cms.untracked.uint32(0),
157 numberOfThreads = cms.untracked.uint32(1),
158 printDependencies = cms.untracked.bool(
False),
159 sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
160 throwIfIllegalParameter = cms.untracked.bool(
True),
161 wantSummary = cms.untracked.bool(
False)
165 process.configurationMetadata = cms.untracked.PSet(
166 annotation = cms.untracked.string(
'step2 nevts:1000'),
167 name = cms.untracked.string(
'Applications'),
168 version = cms.untracked.string(
'$Revision: 1.19 $')
173 process.FEVTDEBUGHLToutput = cms.OutputModule(
"PoolOutputModule",
174 dataset = cms.untracked.PSet(
175 dataTier = cms.untracked.string(
'GEN-SIM-DIGI-RAW'),
176 filterName = cms.untracked.string(
'')
178 fileName = cms.untracked.string(outFile),
179 outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands,
180 splitLevel = cms.untracked.int32(0)
186 process.mix.digitizers = cms.PSet(process.theDigitizersValid)
187 from Configuration.AlCa.GlobalTag
import GlobalTag
188 process.GlobalTag =
GlobalTag(process.GlobalTag, globalTag,
'')
191 process.digitisation_step = cms.Path(process.pdigi_valid)
192 process.L1TrackTrigger_step = cms.Path(process.L1TrackTrigger)
193 process.L1simulation_step = cms.Path(process.SimL1Emulator)
194 process.digi2raw_step = cms.Path(process.DigiToRaw)
195 process.endjob_step = cms.EndPath(process.endOfProcess)
196 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
198 if (options.noise ==
"none"):
199 process.HGCAL_noise_fC.values = [0,0,0]
201 if (options.threshold ==
"none"):
202 process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.adcThreshold_fC = 0.0
203 process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.adcThreshold_fC = 0.0
204 process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.adcThreshold_fC = 0.0
208 process.schedule.insert(0, process.digitisation_step)
209 process.schedule.insert(1, process.L1TrackTrigger_step)
210 process.schedule.insert(2, process.L1simulation_step)
211 process.schedule.insert(3, process.digi2raw_step)
212 process.schedule.extend([process.endjob_step,process.FEVTDEBUGHLToutput_step])
220 from HLTrigger.Configuration.customizeHLTforMC
import customizeHLTforMC
231 from Configuration.StandardSequences.earlyDeleteSettings_cff
import customiseEarlyDelete
def customiseEarlyDelete(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def associatePatAlgosToolsTask(process)