File indexing completed on 2024-11-22 02:45:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 import FWCore.ParameterSet.Config as cms
0011 import os, sys, importlib, re
0012 import FWCore.ParameterSet.VarParsing as VarParsing
0013
0014
0015
0016 options = VarParsing.VarParsing('standard')
0017 options.register('geometry',
0018 "D110",
0019 VarParsing.VarParsing.multiplicity.singleton,
0020 VarParsing.VarParsing.varType.string,
0021 "geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114, D115")
0022 options.register('tol',
0023 0.01,
0024 VarParsing.VarParsing.multiplicity.singleton,
0025 VarParsing.VarParsing.varType.float,
0026 "Tolerance for checking overlaps: 0.0, 0.01, 0.1, 1.0"
0027 )
0028
0029
0030 options.parseArguments()
0031
0032 print(options)
0033
0034
0035
0036
0037 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0038 if (options.geometry == "D115"):
0039 from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0040 process = cms.Process('OverlapCheck',Phase2C20I13M9,dd4hep)
0041 else:
0042 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0043 process = cms.Process('OverlapCheck',Phase2C17I13M9,dd4hep)
0044
0045 geomFile = "Configuration.Geometry.GeometryDD4hepExtendedRun4" + options.geometry + "Reco_cff"
0046 baseName = "cmsRun4" + options.geometry + "DD4hep"
0047
0048 print("Geometry file Name: ", geomFile)
0049 print("Base file Name: ", baseName)
0050
0051 process.load(geomFile)
0052 process.load('FWCore.MessageService.MessageLogger_cfi')
0053
0054
0055
0056
0057 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0058 process = checkOverlap(process)
0059
0060
0061 process.g4SimHits.CheckGeometry = True
0062
0063
0064 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName)
0065 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0066 process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
0067 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0068 process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
0069
0070 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0071
0072 process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('cms:OCMS_1')
0073
0074 process.g4SimHits.G4CheckOverlap.gdmlFlag = cms.bool(False)
0075
0076 process.g4SimHits.G4CheckOverlap.PVname = ''
0077
0078 process.g4SimHits.G4CheckOverlap.LVname = ''
0079
0080
0081 process.g4SimHits.FileNameField = ''
0082 process.g4SimHits.FileNameGDML = ''
0083 process.g4SimHits.FileNameRegions = ''
0084