Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:14:55

0001 ###############################################################################
0002 # Way to use this:  
0003 #   cmsRun g4OverlapCheckDD4jep_cfg.py tol=0.1
0004 #
0005 ###############################################################################
0006 import FWCore.ParameterSet.Config as cms
0007 import FWCore.ParameterSet.VarParsing as VarParsing
0008 from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
0009 
0010 options = VarParsing.VarParsing('standard')
0011 options.register('tol',
0012                  0.1,
0013                  VarParsing.VarParsing.multiplicity.singleton,
0014                  VarParsing.VarParsing.varType.float,
0015                  "Tolerance for checking overlaps: 0.0, 0.01, 0.1, 1.0"
0016 )
0017 options.parseArguments()
0018 print(options)
0019 
0020 process = cms.Process("G4PrintGeometry",Run3_dd4hep)
0021 
0022 process.load('Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff')
0023 
0024 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0025 process = checkOverlap(process)
0026 
0027 # enable Geant4 overlap check 
0028 process.g4SimHits.CheckGeometry = True
0029 
0030 # Geant4 geometry check 
0031 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cms2021dd4hep")
0032 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0033 process.g4SimHits.G4CheckOverlap.Tolerance  = cms.double(options.tol)
0034 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0035 process.g4SimHits.G4CheckOverlap.Depth      = cms.int32(-1)
0036 # tells if NodeName is G4Region or G4PhysicalVolume
0037 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0038 # list of names
0039 process.g4SimHits.G4CheckOverlap.NodeNames  = cms.vstring('cms:OCMS_1')
0040 # process.g4SimHits.G4CheckOverlap.NodeNames  = cms.vstring('DefaultRegionForTheWorld')
0041 # enable dump gdml file 
0042 process.g4SimHits.G4CheckOverlap.gdmlFlag   = cms.bool(False)
0043 # if defined a G4PhysicsVolume info is printed
0044 process.g4SimHits.G4CheckOverlap.PVname     = ''
0045 # if defined a list of daughter volumes is printed
0046 process.g4SimHits.G4CheckOverlap.LVname     = ''
0047 
0048 # extra output files, created if a name is not empty
0049 process.g4SimHits.FileNameField   = ''
0050 process.g4SimHits.FileNameGDML    = ''
0051 process.g4SimHits.FileNameRegions = ''
0052 #