/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/HcalCommonData/test/python/dumpGeometryDD4hep_cfg.py
60 строк
2 KB
Kevin Pedro
remove unnecessary use of imp (geom)
16 июн 2026, 00:18
16 июн 2026, 00:18
5c32a29
Код
Авторство
О чём код?
############################################################################### # Way to use this: # cmsRun dumpGeometryDD4hep_cfg.py geometry=2021 # # Options for geometry 2017, 2018, 2021 # ############################################################################### import FWCore.ParameterSet.Config as cms import os, sys, re import FWCore.ParameterSet.VarParsing as VarParsing #################################################################### ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('geometry', "2021", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "geometry of operations: 2017, 2018, 2021") ### get and parse the command line arguments options.parseArguments() print(options) #################################################################### # Use the options from Configuration.ProcessModifiers.dd4hep_cff import dd4hep process = cms.Process('GeomDump',dd4hep) geomFile = "Configuration.Geometry.GeometryDD4hepExtended" + options.geometry + "Reco_cff" fileName = "hcal" + options.geometry + "DD4hep.root" print("Geometry file: ", geomFile) print("Output file: ", fileName) process.load(geomFile) process.load('FWCore.MessageService.MessageLogger_cfi') if 'MessageLogger' in process.__dict__: process.MessageLogger.HCalGeom=dict() process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) process.add_(cms.ESProducer("TGeoMgrFromDdd", verbose = cms.untracked.bool(False), level = cms.untracked.int32(14) )) process.dump = cms.EDAnalyzer("DumpSimGeometry", outputFileName = cms.untracked.string(fileName) ) process.p = cms.Path(process.dump)