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 if (options.geometry == "D115"):
0038 from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0039 process = cms.Process('OverlapCheck',Phase2C20I13M9)
0040 else:
0041 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0042 process = cms.Process('OverlapCheck',Phase2C17I13M9)
0043
0044 geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
0045 baseName = "cmsRun4" + options.geometry + "DDD"
0046
0047 print("Geometry file Name: ", geomFile)
0048 print("Base file Name: ", baseName)
0049
0050 process.load(geomFile)
0051 process.load('FWCore.MessageService.MessageLogger_cfi')
0052
0053
0054
0055
0056 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0057 process = checkOverlap(process)
0058
0059
0060 process.g4SimHits.CheckGeometry = True
0061
0062
0063 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName)
0064 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0065 process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
0066 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0067 process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
0068
0069 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0070
0071 process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('OCMS')
0072
0073 process.g4SimHits.G4CheckOverlap.gdmlFlag = cms.bool(False)
0074
0075 process.g4SimHits.G4CheckOverlap.PVname = ''
0076
0077 process.g4SimHits.G4CheckOverlap.LVname = ''
0078
0079
0080 process.g4SimHits.FileNameField = ''
0081 process.g4SimHits.FileNameGDML = ''
0082 process.g4SimHits.FileNameRegions = ''
0083