Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-sim92X Modify the cfg's in SimG4Core/PrintGeomInfo to simplify running the overlap tools #35359

Merged
merged 1 commit into from Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckBigXML_cfg.py
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process('SIM',Run3)
Expand All @@ -15,6 +16,16 @@
#if hasattr(process,'MessageLogger'):
# process.MessageLogger.HCalGeom=dict()

options = VarParsing.VarParsing('standard')
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.float,
"Tolerance for checking overlaps: 0.01, 0.1, 1.0"
)
options.parseArguments()
print(options)

from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
process = checkOverlap(process)

Expand All @@ -24,7 +35,7 @@
# Geant4 geometry check
process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021")
process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(0.1)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
# tells if NodeName is G4Region or G4PhysicalVolume
Expand Down
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
process = cms.Process('G4PrintGeometry',Run3_dd4hep)
Expand All @@ -15,6 +16,16 @@
#if hasattr(process,'MessageLogger'):
# process.MessageLogger.HCalGeom=dict()

options = VarParsing.VarParsing('standard')
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.float,
"Tolerance for checking overlaps: 0.01, 0.1, 1.0"
)
options.parseArguments()
print(options)

from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
process = checkOverlap(process)

Expand All @@ -26,7 +37,7 @@
# Geant4 geometry check
process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021")
process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(0.1)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
# tells if NodeName is G4Region or G4PhysicalVolume
Expand Down
14 changes: 13 additions & 1 deletion SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck_cfg.py
@@ -1,4 +1,6 @@
# cmsRun g4OverlapCheck_cfg.py tol=0.01
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

#from Configuration.Eras.Era_Run2_cff import Run2
#process = cms.Process('SIM',Run2)
Expand All @@ -14,6 +16,16 @@
#if hasattr(process,'MessageLogger'):
# process.MessageLogger.HCalGeom=dict()

options = VarParsing.VarParsing('standard')
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.float,
"Tolerance for checking overlaps: 0.01, 0.1, 1.0"
)
options.parseArguments()
print(options)

from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
process = checkOverlap(process)

Expand All @@ -23,7 +35,7 @@
# Geant4 geometry check
process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021")
process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(0.1)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
# tells if NodeName is G4Region or G4PhysicalVolume
Expand Down
13 changes: 12 additions & 1 deletion SimG4Core/PrintGeomInfo/test/python/g4OverlapCheck_dd4hep_cfg.py
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
process = cms.Process('G4PrintGeometry',Run3_dd4hep)
Expand All @@ -9,6 +10,16 @@
#if hasattr(process,'MessageLogger'):
# process.MessageLogger.HCalGeom=dict()

options = VarParsing.VarParsing('standard')
options.register('tol',
0.1,
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.float,
"Tolerance for checking overlaps: 0.01, 0.1, 1.0"
)
options.parseArguments()
print(options)

from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
process = checkOverlap(process)

Expand All @@ -18,7 +29,7 @@
# Geant4 geometry check
process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021")
process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(0.1)
process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
# tells if NodeName is G4Region or G4PhysicalVolume
Expand Down