Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:38

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun g4OverlapCheckHFNoseDDD_cfg.py tol=0.1
0004 #
0005 #   Options for tol 0.01, 0.1, 1.0
0006 #
0007 ###############################################################################
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, imp, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 ####################################################################
0013 ### SETUP OPTIONS
0014 options = VarParsing.VarParsing('standard')
0015 options.register('tol',
0016                  0.1,
0017                  VarParsing.VarParsing.multiplicity.singleton,
0018                  VarParsing.VarParsing.varType.float,
0019                  "Tolerance for checking overlaps: 0.01, 0.1, 1.0"
0020 )
0021 
0022 ### get and parse the command line arguments
0023 options.parseArguments()
0024 
0025 print(options)
0026 
0027 ####################################################################
0028 # Use the options
0029 
0030 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0031 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
0032 process = cms.Process('PROD',Phase2C17I13M9,phase2_hfnose)
0033 
0034 geomFile = "Configuration.Geometry.GeometryExtended2026D94Reco_cff"
0035 baseName = "cms2026D94DDD"
0036 
0037 print("Geometry file Name: ", geomFile)
0038 print("Base file Name:     ", baseName)
0039 
0040 process.load(geomFile)
0041 process.load('FWCore.MessageService.MessageLogger_cfi')
0042 
0043 #if hasattr(process,'MessageLogger'):
0044 #    process.MessageLogger.HGCalGeom=dict()
0045 
0046 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0047 process = checkOverlap(process)
0048 
0049 # enable Geant4 overlap check 
0050 process.g4SimHits.CheckGeometry = True
0051 
0052 # Geant4 geometry check 
0053 process.g4SimHits.G4CheckOverlap.OutputBaseName = cms.string(baseName)
0054 process.g4SimHits.G4CheckOverlap.OverlapFlag = cms.bool(True)
0055 process.g4SimHits.G4CheckOverlap.Tolerance  = cms.double(options.tol)
0056 process.g4SimHits.G4CheckOverlap.Resolution = cms.int32(10000)
0057 process.g4SimHits.G4CheckOverlap.Depth      = cms.int32(-1)
0058 # tells if NodeName is G4Region or G4PhysicalVolume
0059 process.g4SimHits.G4CheckOverlap.RegionFlag = cms.bool(False)
0060 # list of names
0061 process.g4SimHits.G4CheckOverlap.NodeNames  = cms.vstring('OCMS')
0062 # enable dump gdml file 
0063 process.g4SimHits.G4CheckOverlap.gdmlFlag   = cms.bool(False)
0064 # if defined a G4PhysicsVolume info is printed
0065 process.g4SimHits.G4CheckOverlap.PVname     = ''
0066 # if defined a list of daughter volumes is printed
0067 process.g4SimHits.G4CheckOverlap.LVname     = ''
0068 
0069 # extra output files, created if a name is not empty
0070 process.g4SimHits.FileNameField   = ''
0071 process.g4SimHits.FileNameGDML    = ''
0072 process.g4SimHits.FileNameRegions = ''
0073 #