Skip to content

Commit

Permalink
Modify the cfg's in SimG4Core/PrintGeomInfo to simplify running the o…
Browse files Browse the repository at this point in the history
…verlap tools
  • Loading branch information
Sunanda committed Sep 21, 2021
1 parent 8729a0b commit 6c82b42
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
13 changes: 12 additions & 1 deletion SimG4Core/PrintGeomInfo/test/python/g4OverlapCheckBigXML_cfg.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6c82b42

Please sign in to comment.