Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-30 04:10:44

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun g4OverlapCheckBigXML_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.01,
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_DDD_cff import Run3_DDD
0020 process = cms.Process('SIM',Run3_DDD)
0021 process.load('SimG4Core.PrintGeomInfo.cmsExtendedGeometry2021_cfi')
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 # Geant4 geometry check 
0041 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string("cmsBigXMLddd2021")
0042 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0043 process.g4SimHits.G4CheckOverlap.Tolerance  = cms.double(options.tol)
0044 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0045 process.g4SimHits.G4CheckOverlap.Depth      = cms.int32(-1)
0046 # tells if NodeName is G4Region or G4PhysicalVolume
0047 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0048 # list of names
0049 process.g4SimHits.G4CheckOverlap.NodeNames  = cms.vstring('OCMS')
0050 # enable dump gdml file 
0051 process.g4SimHits.G4CheckOverlap.gdmlFlag   = cms.bool(False)
0052 # if defined a G4PhysicsVolume info is printed
0053 process.g4SimHits.G4CheckOverlap.PVname     = ''
0054 # if defined a list of daughter volumes is printed
0055 process.g4SimHits.G4CheckOverlap.LVname     = ''
0056 
0057 # extra output files, created if a name is not empty
0058 process.g4SimHits.FileNameField   = ''
0059 process.g4SimHits.FileNameGDML    = ''
0060 process.g4SimHits.FileNameRegions = ''
0061 #