diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2017DD4hepReco_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2017Reco_cff.py similarity index 100% rename from Configuration/Geometry/python/GeometryDD4hepExtended2017DD4hepReco_cff.py rename to Configuration/Geometry/python/GeometryDD4hepExtended2017Reco_cff.py diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2018DD4hepReco_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2018Reco_cff.py similarity index 100% rename from Configuration/Geometry/python/GeometryDD4hepExtended2018DD4hepReco_cff.py rename to Configuration/Geometry/python/GeometryDD4hepExtended2018Reco_cff.py diff --git a/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDD4hep_cfg.py b/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDD4hep_cfg.py index c27b8c6e2033f..c7cc4217791c7 100644 --- a/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDD4hep_cfg.py +++ b/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDD4hep_cfg.py @@ -1,13 +1,19 @@ ############################################################################### # Way to use this: -# cmsRun g4OverlapCheckDD4jep_cfg.py tol=0.1 +# cmsRun g4OverlapCheckDD4hep_cfg.py geometry=2021 tol=0.1 +# +# Options for geometry 2017, 2018, 2021, 2023 # ############################################################################### import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing -from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep options = VarParsing.VarParsing('standard') +options.register('geometry', + "2021", + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "geometry of operations: 2017, 2018, 2021, 2023") options.register('tol', 0.1, VarParsing.VarParsing.multiplicity.singleton, @@ -17,9 +23,28 @@ options.parseArguments() print(options) -process = cms.Process("G4PrintGeometry",Run3_dd4hep) +baseName = "cmsDD4hep" + options.geometry +geomName = "Configuration.Geometry.GeometryDD4hepExtended" + options.geometry + "Reco_cff" + +from Configuration.ProcessModifiers.dd4hep_cff import dd4hep +if (options.geometry == "2017"): + from Configuration.Eras.Era_Run2_2017_cff import Run2_2017 + process = cms.Process('G4PrintGeometry',Run2_2017,dd4hep) +elif (options.geometry == "2018"): + from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 + process = cms.Process('G4PrintGeometry',Run2_2018,dd4hep) +else: + from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep + process = cms.Process('G4PrintGeometry',Run3_dd4hep) + +print("Base file Name: ", baseName) +print("Geom file Name: ", geomName) + +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load(geomName) -process.load('Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff') +#if hasattr(process,'MessageLogger'): +# process.MessageLogger.HCalGeom=dict() from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import * process = checkOverlap(process) @@ -28,7 +53,7 @@ process.g4SimHits.CheckGeometry = True # Geant4 geometry check -process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021dd4hep") +process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName) process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True) process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol) process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000) diff --git a/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck_cfg.py b/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDDD_cfg.py similarity index 84% rename from SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck_cfg.py rename to SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDDD_cfg.py index 5dcbfea9cc026..7e657ba99c7c2 100644 --- a/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck_cfg.py +++ b/SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckDDD_cfg.py @@ -1,8 +1,8 @@ ############################################################################### # Way to use this: -# cmsRun g4OverlapCheck_cfg.py geometry=2021 tol=0.1 +# cmsRun g4OverlapCheckDDD_cfg.py geometry=2021 tol=0.1 # -# Options for geometry 2016, 2018, 2021 +# Options for geometry 2016, 2017, 2018, 2021, 2023 # ############################################################################### import FWCore.ParameterSet.Config as cms @@ -16,7 +16,7 @@ "2021", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "geometry of operations: 2016, 2018, 2021") + "geometry of operations: 2016, 2017, 2018, 2021, 2023") options.register('tol', 0.1, VarParsing.VarParsing.multiplicity.singleton, @@ -32,25 +32,27 @@ #################################################################### # Use the options +baseName = "cmsDDD" + options.geometry +geomName = "Configuration.Geometry.GeometryExtended" + options.geometry + "Reco_cff" + if (options.geometry == "2016"): from Configuration.Eras.Era_Run2_2016_cff import Run2_2016 process = cms.Process('G4PrintGeometry',Run2_2016) - process.load('Configuration.Geometry.GeometryExtended2016Reco_cff') - baseName = 'cms2016' +elif (options.geometry == "2017"): + from Configuration.Eras.Era_Run2_2017_cff import Run2_2017 + process = cms.Process('G4PrintGeometry',Run2_2017) elif (options.geometry == "2018"): from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 process = cms.Process('G4PrintGeometry',Run2_2018) - process.load('Configuration.Geometry.GeometryExtended2018Reco_cff') - baseName = 'cms2018' else: from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD process = cms.Process('G4PrintGeometry',Run3_DDD) - process.load('Configuration.Geometry.GeometryExtended2021Reco_cff') - baseName = 'cms2021' print("Base file Name: ", baseName) +print("Geom file Name: ", geomName) process.load('FWCore.MessageService.MessageLogger_cfi') +process.load(geomName) #if hasattr(process,'MessageLogger'): # process.MessageLogger.HCalGeom=dict()