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 +
"tt.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(1000)
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,
'')
137 process.generator = cms.EDFilter(
"Pythia8ConcurrentGeneratorFilter",
138 pythiaHepMCVerbosity = cms.untracked.bool(
False),
139 maxEventsToPrint = cms.untracked.int32(0),
140 pythiaPylistVerbosity = cms.untracked.int32(0),
141 filterEfficiency = cms.untracked.double(1.0),
142 comEnergy = cms.double(14000.0),
143 PythiaParameters = cms.PSet(
144 pythia8CommonSettingsBlock,
145 pythia8CUEP8M1SettingsBlock,
146 processParameters = cms.vstring(
147 'Top:gg2ttbar = on ',
148 'Top:qqbar2ttbar = on ',
151 parameterSets = cms.vstring(
'pythia8CommonSettings',
152 'pythia8CUEP8M1Settings',
160 process.ProductionFilterSequence = cms.Sequence(process.generator)
163 process.generation_step = cms.Path(process.pgen)
164 process.simulation_step = cms.Path(process.psim)
165 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
166 process.endjob_step = cms.EndPath(process.endOfProcess)
167 process.analysis_step = cms.Path(process.hgcalHitPartialEE+process.hgcalHitPartialHE)
168 process.out_step = cms.EndPath(process.output)
170 process.g4SimHits.HGCSD.CheckID =
True 171 process.g4SimHits.HGCScintSD.CheckID =
True 174 process.schedule = cms.Schedule(process.generation_step,
175 process.genfiltersummary_step,
176 process.simulation_step,
178 process.analysis_step,
185 for path
in process.paths:
186 getattr(process,path).
insert(0, process.ProductionFilterSequence)
192 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)