Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-01 03:29:46

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun dumpHGCalHEmixDDD_cfg.py type=V17
0004 #
0005 #   Options for type V16, V17
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('type',
0016                  "V17",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: V16, V17")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0026 process = cms.Process("DumpHGCalHEmix",Phase2C17I13M9)
0027 
0028 geomFile = "Geometry.HGCalCommonData.testHGCalHEmix" + options.type + "XML_cfi"
0029 outFile = "hgcalHEmix" + options.type + "DDD.root"
0030 print("Geometry file: ", geomFile)
0031 print("Output file: ", outFile)
0032 
0033 # import of standard configurations
0034 process.load(geomFile)
0035 process.load('FWCore.MessageService.MessageLogger_cfi')
0036 
0037 if 'MessageLogger' in process.__dict__:
0038     process.MessageLogger.G4cerr=dict()
0039     process.MessageLogger.G4cout=dict()
0040     process.MessageLogger.HGCalGeom=dict()
0041 #   process.MessageLogger.TGeoMgrFromDdd=dict()
0042 
0043 process.source = cms.Source("EmptySource")
0044 
0045 process.maxEvents = cms.untracked.PSet(
0046     input = cms.untracked.int32(1)
0047 )
0048 
0049 process.add_(cms.ESProducer("TGeoMgrFromDdd",
0050         verbose = cms.untracked.bool(False),
0051         level   = cms.untracked.int32(14)
0052 ))
0053 
0054 process.dump = cms.EDAnalyzer("DumpSimGeometry",
0055                               outputFileName = cms.untracked.string(outFile))
0056 
0057 process.p = cms.Path(process.dump)