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: D105, D110, D114, V17Shift, D104")
21 options.register(
'type',
23 VarParsing.VarParsing.multiplicity.singleton,
24 VarParsing.VarParsing.varType.string,
25 "type of operations: DDD, DD4hep")
28 options.parseArguments()
35 if (options.type ==
"DD4hep"):
36 from Configuration.ProcessModifiers.dd4hep_cff
import dd4hep
37 if (options.geometry ==
"V17Shift"):
38 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
39 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9,dd4hep)
40 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry +
"Reco_cff" 41 elif (options.geometry ==
"D104"):
42 from Configuration.Eras.Era_Phase2C22I13M9_cff
import Phase2C22I13M9
43 process = cms.Process(
'SingleMuonSim',Phase2C22I13M9,dd4hep)
44 geomFile =
"Configuration.Geometry.Geometry" + options.type +
"ExtendedRun4" + options.geometry +
"Reco_cff" 46 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
47 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9,dd4hep)
48 geomFile =
"Configuration.Geometry.Geometry" + options.type +
"ExtendedRun4" + options.geometry +
"Reco_cff" 50 if (options.geometry ==
"V17Shift"):
51 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
52 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9)
53 geomFile =
"Geometry.HGCalCommonData.testHGCal" + options.geometry +
"Reco_cff" 54 elif (options.geometry ==
"D104"):
55 from Configuration.Eras.Era_Phase2C22I13M9_cff
import Phase2C22I13M9
56 process = cms.Process(
'SingleMuonSim',Phase2C22I13M9)
57 geomFile =
"Configuration.Geometry.GeometryExtendedRun4" + options.geometry +
"Reco_cff" 59 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
60 process = cms.Process(
'SingleMuonSim',Phase2C17I13M9)
61 geomFile =
"Configuration.Geometry.GeometryExtendedRun4" + options.geometry +
"Reco_cff" 63 globalTag =
"auto:phase2_realistic_T33" 64 outFile =
"file:step1" + options.type + options.geometry +
"mu.root" 66 print(
"Geometry file: ", geomFile)
67 print(
"Global Tag: ", globalTag)
68 print(
"Output file: ", outFile)
71 process.load(geomFile)
72 process.load(
'Configuration.StandardSequences.Services_cff')
73 process.load(
'SimGeneral.HepPDTESSource.pythiapdt_cfi')
74 process.load(
'FWCore.MessageService.MessageLogger_cfi')
75 process.load(
'Configuration.EventContent.EventContent_cff')
76 process.load(
'SimGeneral.MixingModule.mixNoPU_cfi')
77 process.load(
'Configuration.StandardSequences.MagneticField_cff')
78 process.load(
'Configuration.StandardSequences.Generator_cff')
79 process.load(
'IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollision_cfi')
80 process.load(
'GeneratorInterface.Core.genFilterSummary_cff')
81 process.load(
'Configuration.StandardSequences.SimIdeal_cff')
82 process.load(
'Configuration.StandardSequences.EndOfProcess_cff')
83 process.load(
'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
84 process.load(
'Configuration.StandardSequences.EndOfProcess_cff')
85 process.load(
'SimG4CMS.Calo.hgcalHitPartial_cff')
86 process.load(
"IOMC.RandomEngine.IOMC_cff")
88 rndm = random.randint(0,200000)
89 process.RandomNumberGeneratorService.generator.initialSeed = rndm
90 print(
"Processing with random number seed: ", rndm)
92 process.maxEvents = cms.untracked.PSet(
93 input = cms.untracked.int32(5000)
96 process.MessageLogger.cerr.FwkReport.reportEvery = 1
97 if hasattr(process,
'MessageLogger'):
98 process.MessageLogger.HGCalError=dict()
103 process.source = cms.Source(
"EmptySource")
105 process.options = cms.untracked.PSet(
106 wantSummary = cms.untracked.bool(
True),
107 numberOfConcurrentRuns = cms.untracked.uint32(1),
108 numberOfStreams = cms.untracked.uint32(0),
109 numberOfThreads = cms.untracked.uint32(1),
110 printDependencies = cms.untracked.bool(
False),
111 sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
115 process.configurationMetadata = cms.untracked.PSet(
116 version = cms.untracked.string(
''),
117 annotation = cms.untracked.string(
''),
118 name = cms.untracked.string(
'Applications')
122 process.output = cms.OutputModule(
"PoolOutputModule",
123 SelectEvents = cms.untracked.PSet(
124 SelectEvents = cms.vstring(
'generation_step')
126 dataset = cms.untracked.PSet(
127 filterName = cms.untracked.string(
''),
128 dataTier = cms.untracked.string(
'GEN-SIM-DIGI-RAW-RECO')
130 fileName = cms.untracked.string(outFile),
131 outputCommands = process.FEVTDEBUGEventContent.outputCommands,
132 eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
133 splitLevel = cms.untracked.int32(0)
139 process.genstepfilter.triggerConditions=cms.vstring(
"generation_step")
140 from Configuration.AlCa.GlobalTag
import GlobalTag
141 process.GlobalTag =
GlobalTag(process.GlobalTag, globalTag,
'')
143 process.generator = cms.EDFilter(
"Pythia8PtGun",
144 PGunParameters = cms.PSet(
145 MaxPt = cms.double(100.01),
146 MinPt = cms.double(99.99),
147 ParticleID = cms.vint32(-13),
148 AddAntiParticle = cms.bool(
True),
149 MaxEta = cms.double(3.1),
150 MaxPhi = cms.double(3.14159265359),
151 MinEta = cms.double(2.8),
152 MinPhi = cms.double(-3.14159265359)
154 Verbosity = cms.untracked.int32(0),
155 psethack = cms.string(
'single mu pt 100'),
156 firstRun = cms.untracked.uint32(1),
157 PythiaParameters = cms.PSet(parameterSets = cms.vstring())
162 process.ProductionFilterSequence = cms.Sequence(process.generator)
164 process.g4SimHits.HGCSD.CheckID =
True 165 process.g4SimHits.HGCScintSD.CheckID =
True 168 process.generation_step = cms.Path(process.pgen)
169 process.simulation_step = cms.Path(process.psim)
170 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
171 process.endjob_step = cms.EndPath(process.endOfProcess)
172 process.analysis_step = cms.Path(process.hgcalHitPartialEE+process.hgcalHitPartialHE+process.hgcalHitPartialHEB)
173 process.out_step = cms.EndPath(process.output)
176 process.schedule = cms.Schedule(process.generation_step,
177 process.genfiltersummary_step,
178 process.simulation_step,
180 process.analysis_step,
187 for path
in process.paths:
188 getattr(process,path).
insert(0, process.ProductionFilterSequence)
194 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)