/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/MuonCommonData/test/python/g4OverlapCheck2021_cfg.py
86 строк
3 KB
Sunanda
Create an XML file for gem11 without chambers 6, 7, 8 on -z side for 2025
11 мар 2025, 08:20
11 мар 2025, 08:20
6473e21
Код
Авторство
О чём код?
############################################################################### # Way to use this: # cmsRun g4OverlapCheck2021_cfg.py geometry=2021 tol=0.1 # # Options for geometry 2018, 2021, 2023, 2024, 2025, 2025N, 2025P, 2025Q, # 2025R # for tol 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('geometry', "2021", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "geometry of operations: 2018, 2021, 2023, 2024, 2025, 2025N,, 2025P, 2025Q, 2025R") options.register('tol', 0.01, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.float, "Tolerance for checking overlaps: 0.01, 0.1, 1.0" ) ### get and parse the command line arguments options.parseArguments() print(options) #################################################################### # Use the options geomName = "Geometry.MuonCommonData.testExtendedGeometry" + options.geometry + "XML_cfi" baseName = "GeometryExtended" + options.geometry + str(options.tol) print("Geometry file: ", geomName) print("Base name: ", baseName) if (options.geometry == "2018"): from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 process = cms.Process('OverlapCheck',Run2_2018) else: from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD process = cms.Process('OverlapCheck',Run3_DDD) process.load(geomName) process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff") process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff") process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff") process.load("Geometry.MuonNumbering.muonGeometryConstants_cff") process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff") 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 = '' #