1 import FWCore.ParameterSet.Config
as cms
3 import FWCore.ParameterSet.VarParsing
as VarParsing
4 from FWCore.Utilities.Enumerate
import Enumerate
6 varType = Enumerate (
"Run1 Ideal2015 Ideal2015dev 2015 2015dev 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")
27 elif score ==
"2015dev":
28 process.load(
"Geometry.CMSCommonData.cmsExtendedGeometry2015devXML_cfi")
30 elif score ==
"Ideal2015":
31 process.load(
"Geometry.CMSCommonData.cmsIdealGeometry2015XML_cfi")
33 elif score ==
"Ideal2015dev":
34 process.load(
"Geometry.CMSCommonData.cmsIdealGeometry2015devXML_cfi")
36 elif score ==
"RPC4RE11":
37 process.load(
"Geometry.CMSCommonData.cmsExtendedGeometry2015XML_RPC4RE11_cfi")
40 process.load(
'Configuration.Geometry.GeometryExtended2017Reco_cff')
43 process.load(
'Configuration.Geometry.GeometryExtended2019Reco_cff')
45 elif score ==
"PhaseIPixel":
46 process.load(
'Geometry.CMSCommonData.cmsExtendedGeometry2017XML_cfi')
49 elif score ==
"2023Muon":
50 process.load(
'Configuration.Geometry.GeometryExtended2023MuonReco_cff')
53 process.load(
'Configuration.Geometry.GeometryExtended2023Reco_cff')
56 process.load(
"Configuration.StandardSequences.GeometryDB_cff")
57 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
59 process.GlobalTag.globaltag = autoCond[
'mc']
61 elif score ==
"SLHCDB":
62 process.load(
"Configuration.StandardSequences.GeometryDB_cff")
63 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
64 process.GlobalTag.globaltag =
'DESIGN42_V17::All'
65 process.XMLFromDBSource.label=
''
67 process.GlobalTag.toGet = cms.VPSet(
68 cms.PSet(record = cms.string(
"GeometryFileRcd"),
69 tag = cms.string(
"XMLFILE_Geometry_428SLHCYV0_Phase1_R30F12_HCal_Ideal_mc"),
70 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_42X_GEOMETRY")
83 defaultOutputFileName=
"cmsSimGeom.root"
85 options.register (
'tag',
87 VarParsing.VarParsing.multiplicity.singleton,
88 VarParsing.VarParsing.varType.string,
89 "info about geometry database conditions")
90 options.register (
'out',
91 defaultOutputFileName,
92 VarParsing.VarParsing.multiplicity.singleton,
93 VarParsing.VarParsing.varType.string,
97 options.parseArguments()
100 if (options.out == defaultOutputFileName ):
101 options.out =
"cmsSimGeom-" + str(options.tag) +
".root"
103 process = cms.Process(
"SIMDUMP")
106 process.source = cms.Source(
"EmptySource")
108 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
110 process.add_(cms.ESProducer(
"TGeoMgrFromDdd",
111 verbose = cms.untracked.bool(
False),
112 level = cms.untracked.int32(defaultLevel)
115 process.dump = cms.EDAnalyzer(
"DumpSimGeometry",
116 tag = cms.untracked.string(options.tag),
117 outputFileName = cms.untracked.string(options.out))
119 process.p = cms.Path(process.dump)