Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-16 00:28:57

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runDDD2026_cfg.py geometry=D88
0004 #
0005 #   Options for geometry D77, D83, D88, D92, D93
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('geometry',
0016                  "D92",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: D77, D83, D88, D92, D93")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 
0029 if (options.geometry == "D83"):
0030     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0031     process = cms.Process('G4PrintGeometry',Phase2C11M9)
0032     process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
0033     materialFileName = 'matfileD83DDD.txt'
0034     solidFileName    = 'solidfileD83DDD.txt'
0035     lvFileName       = 'lvfileD83DDD.txt'
0036     pvFileName       = 'pvfileD83DDD.txt'
0037     touchFileName    = 'touchfileD83DDD.txt'
0038     regionFileName   = 'regionfileD83DDD.txt'
0039 elif (options.geometry == "D77"):
0040     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0041     process = cms.Process('G4PrintGeometry',Phase2C11)
0042     process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
0043     materialFileName = 'matfileD77DDD.txt'
0044     solidFileName    = 'solidfileD77DDD.txt'
0045     lvFileName       = 'lvfileD77DDD.txt'
0046     pvFileName       = 'pvfileD77DDD.txt'
0047     touchFileName    = 'touchfileD77DDD.txt'
0048     regionFileName   = 'regionfileD77DDD.txt'
0049 elif (options.geometry == "D92"):
0050     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0051     process = cms.Process('G4PrintGeometry',Phase2C11)
0052     process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
0053     materialFileName = 'matfileD92DDD.txt'
0054     solidFileName    = 'solidfileD92DDD.txt'
0055     lvFileName       = 'lvfileD92DDD.txt'
0056     pvFileName       = 'pvfileD92DDD.txt'
0057     touchFileName    = 'touchfileD92DDD.txt'
0058     regionFileName   = 'regionfileD92DDD.txt'
0059 elif (options.geometry == "D93"):
0060     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0061     process = cms.Process('G4PrintGeometry',Phase2C11M9)
0062     process.load('Configuration.Geometry.GeometryExtended2026D86Reco_cff')
0063     materialFileName = 'matfileD93DDD.txt'
0064     solidFileName    = 'solidfileD93DDD.txt'
0065     lvFileName       = 'lvfileD93DDD.txt'
0066     pvFileName       = 'pvfileD93DDD.txt'
0067     touchFileName    = 'touchfileD93DDD.txt'
0068     regionFileName   = 'regionfileD93DDD.txt'
0069 else:
0070     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0071     process = cms.Process('G4PrintGeometry',Phase2C11M9)
0072     process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0073     materialFileName = 'matfileD88DDD.txt'
0074     solidFileName    = 'solidfileD88DDD.txt'
0075     lvFileName       = 'lvfileD88DDD.txt'
0076     pvFileName       = 'pvfileD88DDD.txt'
0077     touchFileName    = 'touchfileD88DDD.txt'
0078     regionFileName   = 'regionfileD88DDD.txt'
0079 
0080 print("Material file Name: ", materialFileName)
0081 print("Solid file Name: ", solidFileName)
0082 print("LV file Name: ", lvFileName)
0083 print("PV file Name: ", pvFileName)
0084 print("Touch file Name: ", touchFileName)
0085 print("Region file Name: ", regionFileName)
0086 
0087 process.load('FWCore.MessageService.MessageLogger_cfi')
0088 
0089 from SimG4Core.PrintGeomInfo.g4PrintGeomInfo_cfi import *
0090 
0091 process = printGeomInfo(process)
0092 
0093 if hasattr(process,'MessageLogger'):
0094     process.MessageLogger.G4cerr=dict()
0095     process.MessageLogger.G4cout=dict()
0096 
0097 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0098     DumpSummary      = cms.untracked.bool(True),
0099     DumpLVTree       = cms.untracked.bool(False),
0100     DumpMaterial     = cms.untracked.bool(False),
0101     DumpLVList       = cms.untracked.bool(False),
0102     DumpLV           = cms.untracked.bool(False),
0103     DumpSolid        = cms.untracked.bool(True),
0104     DumpAttributes   = cms.untracked.bool(False),
0105     DumpPV           = cms.untracked.bool(False),
0106     DumpRotation     = cms.untracked.bool(False),
0107     DumpReplica      = cms.untracked.bool(False),
0108     DumpTouch        = cms.untracked.bool(False),
0109     DumpSense        = cms.untracked.bool(False),
0110     DumpRegion       = cms.untracked.bool(False),
0111     DD4hep           = cms.untracked.bool(False),
0112     Name             = cms.untracked.string(''),
0113     Names            = cms.untracked.vstring(''),
0114     MaterialFileName = cms.untracked.string(materialFileName),
0115     SolidFileName    = cms.untracked.string(solidFileName),
0116     LVFileName       = cms.untracked.string(lvFileName),
0117     PVFileName       = cms.untracked.string(pvFileName),
0118     TouchFileName    = cms.untracked.string(touchFileName),
0119     RegionFileName   = cms.untracked.string(regionFileName),
0120     FileDetail       = cms.untracked.bool(True),
0121     type             = cms.string('PrintGeomInfoAction')
0122 ))