/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/TrackerCommonData/test/python/g4CheckOverlaps_cfg.py
80 строк
3 KB
Sunanda
Change names from 2026 to Run4 in several scripts of Geometry (CaloTopology|ForwardCommonData|GEMGeometry|MTDCommonData|MuonNumbering|TrackerCommonData|TrackerGeometryBuilder)
11 ноя 2024, 11:57
11 ноя 2024, 11:57
8ca8d11
Код
Авторство
О чём код?
############################################################################### # Usage example: # cmsRun g4OverlapCheckRun4DDD_cfg.py geometry=D102 tol=0.01 # ############################################################################### import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing #################################################################### ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('geometry', "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Geometry name: e.g. D102" ) options.register('tol', 0.01, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.float, "Overlap tolerance [mm]: 0.01, 0.1, 1.0" ) options.register('full', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.bool, "Check full CMS detector instead of just Tracker" ) ### get and parse the command line arguments options.parseArguments() #################################################################### # Use the options from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 process = cms.Process('OverlapCheck',Phase2C17I13M9) baseName = "GeometryExtendedRun4" + options.geometry geomFile = "Configuration.Geometry." + baseName + "_cff" print("Base file Name: ", baseName) print("Geometry file Name: ", geomFile) process.load(geomFile) process.load('FWCore.MessageService.MessageLogger_cfi') from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import * process = checkOverlap(process) # 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 name to be checked if options.full: print('Checking the whole CMS detector') process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('OCMS') else: print('Checking only Tracker volume') process.g4SimHits.G4CheckOverlap.NodeNames = cms.vstring('Tracker') # 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 = '' #