/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/MuonCommonData/test/python/g4OverlapCheckRun4_cfg.py
78 строк
3 KB
Sunanda
Modify several test scripts in the Geometry package in view of changing Phase2 scenario default to D121 instead of D110
26 ноя 2025, 12:16
26 ноя 2025, 12:16
19c0bae
Код
Авторство
О чём код?
############################################################################### # Way to use this: # cmsRun g4OverlapCheck2021_cfg.py type=D121 tol=0.1 # # Options for type D116, D120, D121 # for tol 0.0,0.01, 0.1, 1.0 # ############################################################################### import FWCore.ParameterSet.Config as cms import os, sys, importlib, re import FWCore.ParameterSet.VarParsing as VarParsing #################################################################### ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('type', "D121", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "geometry of operations: D116, D120, D121") options.register('tol', 0.0, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.float, "Tolerance for checking overlaps: 0.0, 0.01, 0.1, 1.0" ) ### get and parse the command line arguments options.parseArguments() print(options) #################################################################### # Use the options geomName = "Run4" + options.type geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff" baseName = "GeometryExtendedRun4" + options.type + str(options.tol) print("Geometry file: ", geomFile) print("Base name: ", baseName) import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName) process = cms.Process('OverlapCheck',ERA) process.load(geomFile) process.load('FWCore.MessageService.MessageLogger_cfi') from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import * process = checkOverlap(process) #process.MessageLogger.SimG4CoreGeometry=dict() # enable Geant4 overlap check process.g4SimHits.CheckGeometry = True # Geant4 geometry check process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName) process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True) process.g4SimHits.G4CheckOverlap.Tolerance = cms.double(options.tol) process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000) process.g4SimHits.G4CheckOverlap.Depth = cms.int32(-1) # tells if NodeName is G4Region or G4PhysicalVolume process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False) # list of names process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('OCMS') # enable dump gdml file process.g4SimHits.G4CheckOverlap.gdmlFlag = cms.bool(False) # if defined a G4PhysicsVolume info is printed process.g4SimHits.G4CheckOverlap.PVname = '' # if defined a list of daughter volumes is printed process.g4SimHits.G4CheckOverlap.LVname = '' # extra output files, created if a name is not empty process.g4SimHits.FileNameField = '' process.g4SimHits.FileNameGDML = '' process.g4SimHits.FileNameRegions = '' #