Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-08 01:46:14

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runPrintG4SolidsRun3_cfg.py dd4hep=False
0004 #
0005 ###############################################################################
0006 import FWCore.ParameterSet.Config as cms
0007 import os, sys, imp, re
0008 import FWCore.ParameterSet.VarParsing as VarParsing
0009 
0010 ####################################################################
0011 ### SETUP OPTIONS
0012 options = VarParsing.VarParsing('standard')
0013 options.register('dd4hep',
0014                  False,
0015                  VarParsing.VarParsing.multiplicity.singleton,
0016                  VarParsing.VarParsing.varType.bool,
0017                  "Geometry source DD4hep or DDD: False, True")
0018 
0019 ### get and parse the command line arguments
0020 options.parseArguments()
0021 
0022 print(options)
0023 
0024 ####################################################################
0025 # Use the options
0026 if (options.dd4hep):
0027     from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
0028     process = cms.Process('PrintG4Solids',Run3_dd4hep)
0029     process.load('Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff')
0030 else:
0031     from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0032     process = cms.Process('PrintG4Solids',Run3_DDD)
0033     process.load('Configuration.Geometry.GeometryExtended2021Reco_cff')
0034 
0035 process.load('FWCore.MessageService.MessageLogger_cfi')
0036 
0037 if hasattr(process,'MessageLogger'):
0038     process.MessageLogger.G4cerr=dict()
0039     process.MessageLogger.G4cout=dict()
0040 
0041 from SimG4Core.PrintGeomInfo.g4PrintG4Solids_cfi import *
0042 
0043 process = printGeomInfo(process)