File indexing completed on 2024-05-15 04:21:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 import FWCore.ParameterSet.Config as cms
0011 import os, sys, imp, re
0012 import FWCore.ParameterSet.VarParsing as VarParsing
0013
0014
0015
0016 options = VarParsing.VarParsing('standard')
0017 options.register('type',
0018 "EEV17",
0019 VarParsing.VarParsing.multiplicity.singleton,
0020 VarParsing.VarParsing.varType.string,
0021 "type of operations: EEV16, EEV17, HEsilV16, HEsilV17, HEmixV16, HEmixV17, PassiveV18, PassiveV19")
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 options.parseArguments()
0030 print(options)
0031
0032 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0033
0034 process = cms.Process("OverlapCheckLayer",Phase2C17I13M9)
0035
0036
0037
0038 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "XML_cfi"
0039 outFile = "hgcal" + options.type + str(options.tol)
0040
0041 print("Geometry file: ", geomFile)
0042 print("Output file: ", outFile)
0043
0044 process.load('FWCore.MessageService.MessageLogger_cfi')
0045 process.load(geomFile)
0046
0047 if hasattr(process,'MessageLogger'):
0048 process.MessageLogger.HGCalGeom=dict()
0049
0050 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0051 process = checkOverlap(process)
0052
0053
0054 process.g4SimHits.CheckGeometry = True
0055 process.g4SimHits.OnlySDs = ['DreamSensitiveDetector']
0056
0057
0058 process.g4SimHits.G4CheckOverlap.OutputBaseName = outFile
0059 process.g4SimHits.G4CheckOverlap.OverlapFlag = True
0060 process.g4SimHits.G4CheckOverlap.Tolerance = options.tol
0061 process.g4SimHits.G4CheckOverlap.Resolution = 10000
0062 process.g4SimHits.G4CheckOverlap.Depth = -1
0063
0064 process.g4SimHits.G4CheckOverlap.RegionFlag = False
0065
0066 process.g4SimHits.G4CheckOverlap.NodeNames = ['OCMS']
0067
0068 process.g4SimHits.G4CheckOverlap.gdmlFlag = False
0069
0070 process.g4SimHits.G4CheckOverlap.PVname = ''
0071
0072 process.g4SimHits.G4CheckOverlap.LVname = ''
0073
0074
0075 process.g4SimHits.FileNameField = ''
0076 process.g4SimHits.FileNameGDML = ''
0077 process.g4SimHits.FileNameRegions = ''
0078