File indexing completed on 2025-02-13 02:58:31
0001
0002
0003
0004
0005
0006
0007
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, importlib, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011
0012
0013
0014 options = VarParsing.VarParsing('standard')
0015 options.register('geometry',
0016 "2024",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "geometry of operations: 2016, 2016dev, 2017, 2018, 2021, 2023, 2024, 2025")
0020 options.register('tol',
0021 0.01,
0022 VarParsing.VarParsing.multiplicity.singleton,
0023 VarParsing.VarParsing.varType.float,
0024 "Tolerance for checking overlaps: 0.0, 0.01, 0.1, 1.0"
0025 )
0026
0027
0028 options.parseArguments()
0029
0030 print(options)
0031
0032
0033
0034
0035 baseName = "cmsDDD" + options.geometry
0036 geomName = "Configuration.Geometry.GeometryExtended" + options.geometry + "Reco_cff"
0037
0038 if (options.geometry == "2016"):
0039 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0040 process = cms.Process('G4PrintGeometry',Run2_2016)
0041 elif (options.geometry == "2016dev"):
0042 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0043 process = cms.Process('G4PrintGeometry',Run2_2016)
0044 elif (options.geometry == "2017"):
0045 from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
0046 process = cms.Process('G4PrintGeometry',Run2_2017)
0047 elif (options.geometry == "2018"):
0048 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0049 process = cms.Process('G4PrintGeometry',Run2_2018)
0050 else:
0051 from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0052 process = cms.Process('G4PrintGeometry',Run3_DDD)
0053
0054 print("Base file Name: ", baseName)
0055 print("Geom file Name: ", geomName)
0056
0057 process.load('FWCore.MessageService.MessageLogger_cfi')
0058 process.load(geomName)
0059
0060
0061
0062
0063 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0064 process = checkOverlap(process)
0065
0066
0067 process.g4SimHits.CheckGeometry = True
0068
0069
0070 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName)
0071 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0072 process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol)
0073 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0074 process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1)
0075
0076 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0077
0078 process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('OCMS')
0079
0080 process.g4SimHits.G4CheckOverlap.gdmlFlag = cms.bool(False)
0081
0082 process.g4SimHits.G4CheckOverlap.PVname = ''
0083
0084 process.g4SimHits.G4CheckOverlap.LVname = ''
0085
0086
0087 process.g4SimHits.FileNameField = ''
0088 process.g4SimHits.FileNameGDML = ''
0089 process.g4SimHits.FileNameRegions = ''
0090