3 import FWCore.ParameterSet.VarParsing
as VarParsing
4 from FWCore.Utilities.Enumerate
import Enumerate
6 varType = Enumerate (
"Run1 2015 2019 PhaseIPixel Phase1_R34F16 Phase2Tk 2023Muon SLHC DB SLHCDB")
9 print "Usage: cmsRun dumpSimGeometry_cfg.py tag=TAG "
11 print " indentify geometry condition database tag"
12 print " ", varType.keys()
14 print " out=outputFileName"
15 print " default is cmsSimGeom<tag>.root"
20 print "Loading configuration for tag ", options.tag ,
"...\n"
22 process.load(
"Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
25 process.load(
"Geometry.CMSCommonData.cmsExtendedGeometry2015XML_cfi")
28 process.load(
'Configuration.Geometry.GeometryExtended2019Reco_cff')
30 elif score ==
"PhaseIPixel":
31 process.load(
'Geometry.CMSCommonData.GeometryExtendedPhaseIPixel_cfi')
33 elif score ==
"Phase1_R34F16":
34 process.load(
'Geometry.CMSCommonData.Phase1_R34F16_cmsSimIdealGeometryXML_cff')
36 elif score ==
"Phase2Tk":
37 process.load(
'Geometry.CMSCommonData.cmsExtendedGeometryPhase2TkBEXML_cfi')
39 elif score ==
"2023Muon":
40 process.load(
'Configuration.Geometry.GeometryExtended2023MuonReco_cff')
44 process.load(
'SLHCUpgradeSimulations.Geometry.Phase1_R30F12_HCal_cmsSimIdealGeometryXML_cff')
47 process.load(
"Configuration.StandardSequences.GeometryDB_cff")
48 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
49 from Configuration.AlCa.autoCond
import autoCond
50 process.GlobalTag.globaltag = autoCond[
'mc']
52 elif score ==
"SLHCDB":
53 process.load(
"Configuration.StandardSequences.GeometryDB_cff")
54 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
55 process.GlobalTag.globaltag =
'DESIGN42_V17::All'
56 process.XMLFromDBSource.label=
''
58 process.GlobalTag.toGet = cms.VPSet(
59 cms.PSet(record = cms.string(
"GeometryFileRcd"),
60 tag = cms.string(
"XMLFILE_Geometry_428SLHCYV0_Phase1_R30F12_HCal_Ideal_mc"),
61 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_42X_GEOMETRY")
74 defaultOutputFileName=
"cmsSimGeom.root"
76 options.register (
'tag',
78 VarParsing.VarParsing.multiplicity.singleton,
79 VarParsing.VarParsing.varType.string,
80 "info about geometry database conditions")
81 options.register (
'out',
82 defaultOutputFileName,
83 VarParsing.VarParsing.multiplicity.singleton,
84 VarParsing.VarParsing.varType.string,
88 options.parseArguments()
91 if (options.out == defaultOutputFileName ):
92 options.out =
"cmsSimGeom-" + str(options.tag) +
".root"
94 process = cms.Process(
"SIMDUMP")
97 process.source = cms.Source(
"EmptySource")
99 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
101 process.add_(cms.ESProducer(
"TGeoMgrFromDdd",
102 verbose = cms.untracked.bool(
False),
103 level = cms.untracked.int32(defaultLevel)
106 process.dump = cms.EDAnalyzer(
"DumpSimGeometry",
107 tag = cms.untracked.string(options.tag),
108 outputFileName = cms.untracked.string(options.out))
110 process.p = cms.Path(process.dump)