File indexing completed on 2024-11-05 05:20:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 import FWCore.ParameterSet.Config as cms
0010 import os, sys, importlib, re
0011 import FWCore.ParameterSet.VarParsing as VarParsing
0012
0013
0014
0015 options = VarParsing.VarParsing('standard')
0016 options.register('geometry',
0017 "2021",
0018 VarParsing.VarParsing.multiplicity.singleton,
0019 VarParsing.VarParsing.varType.string,
0020 "geometry of operations: 2021, 2023, 2024, 2025")
0021 options.register('tol',
0022 0.01,
0023 VarParsing.VarParsing.multiplicity.singleton,
0024 VarParsing.VarParsing.varType.float,
0025 "Tolerance for checking overlaps: 0.01, 0.1, 1.0"
0026 )
0027
0028
0029 options.parseArguments()
0030
0031 print(options)
0032
0033
0034
0035 geomName = "Geometry.MuonCommonData.testExtendedGeometry" + options.geometry + "XML_cfi"
0036 baseName = "GeometryExtended" + options.geometry + str(options.tol)
0037
0038 print("Geometry file: ", geomName)
0039 print("Base name: ", baseName)
0040
0041 from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0042 process = cms.Process('OverlapCheck',Run3_DDD)
0043
0044 process.load(geomName)
0045 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff")
0046 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0047 process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
0048 process.load("Geometry.MuonNumbering.muonGeometryConstants_cff")
0049 process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff")
0050 process.load('FWCore.MessageService.MessageLogger_cfi')
0051
0052 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0053 process = checkOverlap(process)
0054
0055
0056
0057
0058 process.g4SimHits.CheckGeometry = True
0059
0060
0061 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName)
0062 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0063 process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
0064 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0065 process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
0066
0067 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0068
0069 process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('OCMS')
0070
0071 process.g4SimHits.G4CheckOverlap.gdmlFlag = cms.bool(False)
0072
0073 process.g4SimHits.G4CheckOverlap.PVname = ''
0074
0075 process.g4SimHits.G4CheckOverlap.LVname = ''
0076
0077
0078 process.g4SimHits.FileNameField = ''
0079 process.g4SimHits.FileNameGDML = ''
0080 process.g4SimHits.FileNameRegions = ''
0081