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 g4OverlapCheckBigXMLdd4hep_cfg.py tol=0.1
0004 #
0005 ###############################################################################
0006 import FWCore.ParameterSet.Config as cms
0007 import FWCore.ParameterSet.VarParsing as VarParsing
0008 
0009 options = VarParsing.VarParsing('standard')
0010 options.register('tol',
0011                  0.1,
0012                  VarParsing.VarParsing.multiplicity.singleton,
0013                  VarParsing.VarParsing.varType.float,
0014                  "Tolerance for checking overlaps: 0.0, 0.01, 0.1, 1.0"
0015 )
0016 options.parseArguments()
0017 print(options)
0018 
0019 from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
0020 process = cms.Process('G4PrintGeometry',Run3_dd4hep)
0021 process.load("Configuration.Geometry.GeometryDD4hep_cff")
0022 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff")
0023 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0024 process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
0025 process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi")
0026 process.load("Geometry.MuonNumbering.muonGeometryConstants_cff")
0027 process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff")
0028 
0029 process.load('FWCore.MessageService.MessageLogger_cfi')
0030 
0031 #if hasattr(process,'MessageLogger'):
0032 #    process.MessageLogger.HCalGeom=dict()
0033 
0034 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0035 process = checkOverlap(process)
0036 
0037 # enable Geant4 overlap check 
0038 process.g4SimHits.CheckGeometry = True
0039 
0040 process.DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml")
0041 
0042 # Geant4 geometry check 
0043 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cmsBigXMLdd4hep2021")
0044 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0045 process.g4SimHits.G4CheckOverlap.Tolerance  = cms.double(options.tol)
0046 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0047 process.g4SimHits.G4CheckOverlap.Depth      = cms.int32(-1)
0048 # tells if NodeName is G4Region or G4PhysicalVolume
0049 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0050 # list of names
0051 process.g4SimHits.G4CheckOverlap.NodeNames  = cms.vstring('cms:OCMS_1')
0052 # enable dump gdml file 
0053 process.g4SimHits.G4CheckOverlap.gdmlFlag   = cms.bool(False)
0054 # if defined a G4PhysicsVolume info is printed
0055 process.g4SimHits.G4CheckOverlap.PVname     = ''
0056 # if defined a list of daughter volumes is printed
0057 process.g4SimHits.G4CheckOverlap.LVname     = ''
0058 
0059 # extra output files, created if a name is not empty
0060 process.g4SimHits.FileNameField   = ''
0061 process.g4SimHits.FileNameGDML    = ''
0062 process.g4SimHits.FileNameRegions = ''
0063 #