Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, file /SimG4Core/PrintGeomInfo/test/python/runSummaryRun4_cfg.py was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runSummaryRun4_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, D116, D117, D118, D119
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, D116, D117, D118, D119")
0022 
0023 ### get and parse the command line arguments
0024 options.parseArguments()
0025 
0026 print(options)
0027 
0028 #####p###############################################################
0029 # Use the options
0030 
0031 geomName = "Run4" + options.geometry
0032 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
0033 GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
0034 print("Geometry Name:   ", geomName)
0035 print("Global Tag Name: ", GLOBAL_TAG)
0036 print("Era Name:        ", ERA)
0037 
0038 process = cms.Process('G4PrintGeometry',ERA)
0039 geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
0040 
0041 print("Geometry file Name: ", geomFile)
0042 
0043 process.load(geomFile)
0044 process.load('FWCore.MessageService.MessageLogger_cfi')
0045 
0046 if hasattr(process,'MessageLogger'):
0047     process.MessageLogger.G4cout=dict()
0048     process.MessageLogger.G4cerr=dict()
0049 
0050 from SimG4Core.PrintGeomInfo.g4PrintGeomSummary_cfi import *
0051 
0052 process = printGeomSummary(process)