Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-30 04:10:44

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runDDD2026_cfg.py geometry=D88
0004 #
0005 #   Options for geometry D86, D88, D91, D92, D93, D94, D95, D96, D97, D98, D99,
0006 #                        D100  D101, D102, D103, D104, D105, D106, D107,
0007 #                        D108, D109, D110, D111, D112, D113
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                  "D92",
0019                   VarParsing.VarParsing.multiplicity.singleton,
0020                   VarParsing.VarParsing.varType.string,
0021                   "geometry of operations: D86, D88, D91, D92, D93, D94, D95, D96, D97, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113")
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 == "D94"):
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.GeometryExtended2026" + 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 ))