Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-24 22:29:51

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCGeomCheck_cfg.py type=EE
0004 #
0005 #   Options for type EE, HEsil, HEmix
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('type',
0016                  "EE",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: EE, HEsil, HEmix")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0026 
0027 process = cms.Process("OverlapTest",Phase2C11)
0028 
0029 ####################################################################
0030 # Use the options
0031 if (options.type == "EE"):
0032     process.load('Geometry.HGCalCommonData.testHGCalEEV17XML_cfi')
0033     outFile = 'hgcalEE17'
0034 elif (options.type == "HEsil"):
0035     process.load('Geometry.HGCalCommonData.testHGCalHEsilV17XML_cfi')
0036     outFile = 'hgcalHEsil17'
0037 else:
0038     process.load('Geometry.HGCalCommonData.testHGCalHEmixV17XML_cfi')
0039     outFile = 'hgcalHEmix17'
0040 
0041 print("Output file: ", outFile)
0042 process.load('FWCore.MessageService.MessageLogger_cfi')
0043 
0044 if hasattr(process,'MessageLogger'):
0045 #   process.MessageLogger.SimG4CoreGeometry=dict()
0046     process.MessageLogger.HGCalGeom=dict()
0047 
0048 from SimG4Core.PrintGeomInfo.g4TestGeometry_cfi import *
0049 process = checkOverlap(process)
0050 
0051 # enable Geant4 overlap check 
0052 process.g4SimHits.CheckGeometry = True
0053 process.g4SimHits.OnlySDs = ['DreamSensitiveDetector']
0054 
0055 # Geant4 geometry check 
0056 process.g4SimHits.G4CheckOverlap.OutputBaseName = outFile
0057 process.g4SimHits.G4CheckOverlap.OverlapFlag = True
0058 process.g4SimHits.G4CheckOverlap.Tolerance  = 0.01
0059 process.g4SimHits.G4CheckOverlap.Resolution = 10000
0060 process.g4SimHits.G4CheckOverlap.Depth      = -1
0061 # tells if NodeName is G4Region or G4PhysicalVolume
0062 process.g4SimHits.G4CheckOverlap.RegionFlag = False
0063 # list of names
0064 process.g4SimHits.G4CheckOverlap.NodeNames  = ['OCMS']
0065 # enable dump gdml file 
0066 process.g4SimHits.G4CheckOverlap.gdmlFlag   = False
0067 # if defined a G4PhysicsVolume info is printed
0068 process.g4SimHits.G4CheckOverlap.PVname     = ''
0069 # if defined a list of daughter volumes is printed
0070 process.g4SimHits.G4CheckOverlap.LVname     = ''
0071 
0072 # extra output files, created if a name is not empty
0073 process.g4SimHits.FileNameField   = ''
0074 process.g4SimHits.FileNameGDML    = ''
0075 process.g4SimHits.FileNameRegions = ''
0076 #