Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-07 06:13:05

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runDDDRun4_cfg.py geometry=D110
0004 #
0005 #   Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104,
0006 #                        D105, D106, D107, D108, D109, D110, D111, D112, D113,
0007 #                        D114, D115
0008 #
0009 ###############################################################################
0010 import FWCore.ParameterSet.Config as cms
0011 import os, sys, importlib, re
0012 import FWCore.ParameterSet.VarParsing as VarParsing
0013 
0014 ####################################################################
0015 ### SETUP OPTIONS
0016 options = VarParsing.VarParsing('standard')
0017 options.register('geometry',
0018                  "D110",
0019                   VarParsing.VarParsing.multiplicity.singleton,
0020                   VarParsing.VarParsing.varType.string,
0021                   "geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114, D115")
0022 
0023 ### get and parse the command line arguments
0024 options.parseArguments()
0025 
0026 print(options)
0027 
0028 ####################################################################
0029 # Use the options
0030 
0031 if (options.geometry == "D115"):
0032     from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0033     process = cms.Process('G4PrintGeometry',Phase2C20I13M9)
0034 else:
0035     from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0036     process = cms.Process('G4PrintGeometry',Phase2C17I13M9)
0037 
0038 geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
0039 materialFileName = "matfile" + options.geometry + "DDD.txt"
0040 solidFileName    = "solidfile" + options.geometry + "DDD.txt"
0041 lvFileName       = "lvfile" + options.geometry + "DDD.txt"
0042 pvFileName       = "pvfile" + options.geometry + "DDD.txt"
0043 touchFileName    = "touchfile" + options.geometry + "DDD.txt"
0044 regionFileName   = "regionfile" + options.geometry + "DDD.txt"
0045 
0046 print("Geometry file Name: ", geomFile)
0047 print("Material file Name: ", materialFileName)
0048 print("Solid file Name:    ", solidFileName)
0049 print("LV file Name:       ", lvFileName)
0050 print("PV file Name:       ", pvFileName)
0051 print("Touch file Name:    ", touchFileName)
0052 print("Region file Name:   ", regionFileName)
0053 
0054 process.load(geomFile)
0055 process.load('FWCore.MessageService.MessageLogger_cfi')
0056 
0057 from SimG4Core.PrintGeomInfo.g4PrintGeomInfo_cfi import *
0058 
0059 process = printGeomInfo(process)
0060 
0061 if hasattr(process,'MessageLogger'):
0062     process.MessageLogger.G4cerr=dict()
0063     process.MessageLogger.G4cout=dict()
0064 
0065 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0066     DumpSummary      = cms.untracked.bool(True),
0067     DumpLVTree       = cms.untracked.bool(False),
0068     DumpMaterial     = cms.untracked.bool(False),
0069     DumpLVList       = cms.untracked.bool(False),
0070     DumpLV           = cms.untracked.bool(False),
0071     DumpSolid        = cms.untracked.bool(True),
0072     DumpAttributes   = cms.untracked.bool(False),
0073     DumpPV           = cms.untracked.bool(False),
0074     DumpRotation     = cms.untracked.bool(False),
0075     DumpReplica      = cms.untracked.bool(False),
0076     DumpTouch        = cms.untracked.bool(False),
0077     DumpSense        = cms.untracked.bool(False),
0078     DumpRegion       = cms.untracked.bool(False),
0079     DD4hep           = cms.untracked.bool(False),
0080     Name             = cms.untracked.string(''),
0081     Names            = cms.untracked.vstring(''),
0082     MaterialFileName = cms.untracked.string(materialFileName),
0083     SolidFileName    = cms.untracked.string(solidFileName),
0084     LVFileName       = cms.untracked.string(lvFileName),
0085     PVFileName       = cms.untracked.string(pvFileName),
0086     TouchFileName    = cms.untracked.string(touchFileName),
0087     RegionFileName   = cms.untracked.string(regionFileName),
0088     FileDetail       = cms.untracked.bool(True),
0089     type             = cms.string('PrintGeomInfoAction')
0090 ))