Skip to content

Commit

Permalink
Merge pull request #39763 from bsunanda/Run3-sim134
Browse files Browse the repository at this point in the history
Run3-sim134 Modify the scripts to get geometry statistics for phase2 scenarios
  • Loading branch information
cmsbuild authored Oct 20, 2022
2 parents ed4c9be + 301aa69 commit c81258c
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 48 deletions.
6 changes: 0 additions & 6 deletions SimG4Core/PrintGeomInfo/python/g4PrintGeomSummary_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
def printGeomSummary(process):

process.load("SimGeneral.HepPDTESSource.pdt_cfi")

process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
process.load("IOMC.RandomEngine.IOMC_cff")
process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
process.load('GeneratorInterface.Core.generatorSmeared_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')

process.load("SimG4Core.Application.g4SimHits_cfi")

process.source = cms.Source("EmptySource")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Way to use this:
# cmsRun g4OverlapCheck2026DD4hep_cfg.py geometry=D92 tol=0.1
#
# Options for geometry D77, D83, D88, D92, D93
# Options for geometry D88, D92, D93
#
###############################################################################
import FWCore.ParameterSet.Config as cms
Expand All @@ -16,7 +16,7 @@
"D88",
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"geometry of operations: D77, D83, D88, D92, D93")
"geometry of operations: D88, D92, D93")
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
Expand All @@ -33,17 +33,7 @@
# Use the options

from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
if (options.geometry == "D83"):
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PROD',Phase2C11M9,dd4hep)
process.load('Configuration.Geometry.GeometryDD4hepExtended2026D83Reco_cff')
baseName = 'cms2026D83DD4hep'
elif (options.geometry == "D77"):
from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
process = cms.Process('PROD',Phase2C11,dd4hep)
process.load('Configuration.Geometry.GeometryDD4hepExtended2026D77Reco_cff')
baseName = 'cms2026D77DD4hep'
elif (options.geometry == "D92"):
if (options.geometry == "D92"):
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PROD',Phase2C11M9,dd4hep)
process.load('Configuration.Geometry.GeometryDD4hepExtended2026D92Reco_cff')
Expand Down
16 changes: 3 additions & 13 deletions SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck2026DDD_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Way to use this:
# cmsRun g4OverlapCheck2026DDD_cfg.py geometry=D88 tol=0.1
#
# Options for geometry D77, D83, D88, D92, D93
# Options for geometry D88, D92, D93
#
###############################################################################
import FWCore.ParameterSet.Config as cms
Expand All @@ -16,7 +16,7 @@
"D88",
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"geometry of operations: D77, D83, D88, D92, D93")
"geometry of operations: D88, D92, D93")
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
Expand All @@ -32,17 +32,7 @@
####################################################################
# Use the options

if (options.geometry == "D83"):
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PROD',Phase2C11M9)
process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
baseName = 'cms2026D83DDD'
elif (options.geometry == "D77"):
from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
process = cms.Process('PROD',Phase2C11)
process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
baseName = 'cms2026D77DDD'
elif (options.geometry == "D92"):
if (options.geometry == "D92"):
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PROD',Phase2C11M9)
process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
###############################################################################
# Way to use this:
# cmsRun g4OverlapCheck_dd4hep_cfg.py tol=0.1
#
# Options for tol 0.01, 0.1, 1.0
#
###############################################################################
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

Expand Down
44 changes: 35 additions & 9 deletions SimG4Core/PrintGeomInfo/test/python/runSens_cfg.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
###############################################################################
# Way to use this:
# cmsRun runSens_cfg.py geometry=Run3
#
# Options for geometry Run3, D88, D92, D93
#
###############################################################################
import FWCore.ParameterSet.Config as cms
import os, sys, imp, re
import FWCore.ParameterSet.VarParsing as VarParsing

from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
process = cms.Process('PrintGeometry',Run3_DDD)
process.load('Configuration.Geometry.GeometryExtended2021Reco_cff')
####################################################################
### SETUP OPTIONS
options = VarParsing.VarParsing('standard')
options.register('geometry',
"Run3",
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"geometry of operations: Run3, D88, D92, D93")

#from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
#process = cms.Process('PrintGeometry',Run3_dd4hep)
#process.load('Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff')
### get and parse the command line arguments
options.parseArguments()

#from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
#process = cms.Process('PrintGeometry',Phase2C11)
#process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
print(options)

#####p###############################################################
# Use the options

if (options.geometry == "Run3"):
geomFile = "Configuration.Geometry.GeometryExtended2021Reco_cff"
from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
process = cms.Process('PrintSensitive',Run3_DDD)
else:
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PrintSensitive',Phase2C11M9)

print("Geometry file: ", geomFile)

process.load(geomFile)
process.load('FWCore.MessageService.MessageLogger_cfi')

process.MessageLogger.cerr.enable = False
Expand Down
43 changes: 36 additions & 7 deletions SimG4Core/PrintGeomInfo/test/python/runSummary_cfg.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
###############################################################################
# Way to use this:
# cmsRun runSummary_cfg.py geometry=Run3
#
# Options for geometry Run3, D88, D92, D93
#
###############################################################################
import FWCore.ParameterSet.Config as cms
import os, sys, imp, re
import FWCore.ParameterSet.VarParsing as VarParsing

from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
process = cms.Process('PrintGeometry',Run3_DDD)
process.load('Configuration.Geometry.GeometryExtended2021Reco_cff')
####################################################################
### SETUP OPTIONS
options = VarParsing.VarParsing('standard')
options.register('geometry',
"Run3",
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"geometry of operations: Run3, D88, D92, D93")

#from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
#process = cms.Process('PrintGeometry',Phase2C11)
#process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
#process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
### get and parse the command line arguments
options.parseArguments()

print(options)

#####p###############################################################
# Use the options

if (options.geometry == "Run3"):
geomFile = "Configuration.Geometry.GeometryExtended2021Reco_cff"
from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
process = cms.Process('PrintGeometry',Run3_DDD)
else:
geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
process = cms.Process('PrintGeometry',Phase2C11M9)

print("Geometry file: ", geomFile)

process.load(geomFile)
process.load('FWCore.MessageService.MessageLogger_cfi')

if hasattr(process,'MessageLogger'):
Expand Down

0 comments on commit c81258c

Please sign in to comment.