|
1 | 1 | ############################################################################### |
2 | 2 | # Way to use this: |
3 | | -# cmsRun Sim2026_cfg.py geometry=D98 type=DDD data=Muon |
| 3 | +# cmsRun SimRun4_cfg.py geometry=D110 type=DDD data=Muon |
4 | 4 | # |
5 | | -# Options for geometry: D98, D99 |
| 5 | +# Options for geometry: D110, D120 |
6 | 6 | # type: DDD, DD4hep |
7 | 7 | # data: Muon, MinBias |
8 | 8 | # |
9 | 9 | ############################################################################### |
10 | 10 | import FWCore.ParameterSet.Config as cms |
11 | | -import os, sys, imp, re, random |
| 11 | +import os, sys, importlib, re, random |
12 | 12 | import FWCore.ParameterSet.VarParsing as VarParsing |
13 | 13 |
|
14 | 14 | #################################################################### |
15 | 15 | ### SETUP OPTIONS |
16 | 16 | options = VarParsing.VarParsing('standard') |
17 | 17 | options.register('geometry', |
18 | | - "D98", |
| 18 | + "D110", |
19 | 19 | VarParsing.VarParsing.multiplicity.singleton, |
20 | 20 | VarParsing.VarParsing.varType.string, |
21 | | - "geometry of operations: D98, D99") |
| 21 | + "geometry of operations: D110, D120") |
22 | 22 | options.register('type', |
23 | 23 | "DDD", |
24 | 24 | VarParsing.VarParsing.multiplicity.singleton, |
|
38 | 38 | #################################################################### |
39 | 39 | # Use the options |
40 | 40 |
|
41 | | -from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 |
| 41 | +geomName = "Run4" + options.geometry |
| 42 | +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings |
| 43 | +GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName) |
| 44 | + |
42 | 45 | if (options.type == "DD4hep"): |
43 | 46 | from Configuration.ProcessModifiers.dd4hep_cff import dd4hep |
44 | | - process = cms.Process('Sim2026',Phase2C17I13M9,dd4hep) |
45 | | - geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended2026" + options.geometry + "Reco_cff" |
| 47 | + process = cms.Process('SimRun4',ERA,dd4hep) |
| 48 | + geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended" + geomName + "Reco_cff" |
46 | 49 | else: |
47 | | - process = cms.Process('Sim2026',Phase2C17I13M9) |
48 | | - geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff" |
| 50 | + process = cms.Process('SimRun4',ERA) |
| 51 | + geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff" |
49 | 52 |
|
50 | | -globalTag = "auto:phase2_realistic_T25" |
51 | 53 | inFile = "file:step0" + options.data + ".root" |
52 | 54 | outFile = "file:step1" + options.type + options.geometry + options.data + ".root" |
53 | 55 | tFile = "file:" + options.type + options.geometry + options.data + ".root" |
54 | 56 |
|
55 | | -print("Geometry file: ", geomFile) |
56 | | -print("Global Tag: ", globalTag) |
57 | | -print("Input file: ", inFile) |
58 | | -print("Output file: ", outFile) |
59 | | -print("Histogram file:", tFile) |
| 57 | +print("Geometry file: ", geomFile) |
| 58 | +print("Global Tag Name: ", GLOBAL_TAG) |
| 59 | +print("Era Name: ", ERA) |
| 60 | +print("Input file: ", inFile) |
| 61 | +print("Output file: ", outFile) |
| 62 | +print("Histogram file: ", tFile) |
60 | 63 |
|
61 | 64 | process.load(geomFile) |
62 | 65 | process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") |
|
67 | 70 | process.load("Configuration.StandardSequences.SimIdeal_cff") |
68 | 71 | process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") |
69 | 72 | from Configuration.AlCa.GlobalTag import GlobalTag |
70 | | -process.GlobalTag = GlobalTag(process.GlobalTag, globalTag, '') |
| 73 | +process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '') |
71 | 74 |
|
72 | 75 | process.source = cms.Source("PoolSource", |
73 | 76 | dropDescendantsOfDroppedBranches = cms.untracked.bool(False), |
|
0 commit comments