Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:49:58

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun dumpHGCalTB_cfg.py type=TB230FEB
0004 #
0005 #   Options for type TB230FEB, TB230Jul
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                  "TB230FEB",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: TB230FEB, TB230Jul")
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("DumpHGCalT",Phase2C17I13M9)
0027 
0028 geomFile = "Geometry.HGCalTBCommonData.test" + options.type + "XML_cfi"
0029 outFile = "hgcal" + options.type + "DDD.root"
0030 print("Geometry file: ", geomFile)
0031 print("Output file: ", outFile)
0032 
0033 process.load(geomFile)
0034 process.load('FWCore.MessageService.MessageLogger_cfi')
0035 
0036 if 'MessageLogger' in process.__dict__:
0037     process.MessageLogger.G4cerr=dict()
0038     process.MessageLogger.G4cout=dict()
0039     process.MessageLogger.HGCalGeom=dict()
0040 #   process.MessageLogger.TGeoMgrFromDdd=dict()
0041 
0042 process.source = cms.Source("EmptySource")
0043 
0044 process.maxEvents = cms.untracked.PSet(
0045     input = cms.untracked.int32(1)
0046 )
0047 
0048 process.add_(cms.ESProducer("TGeoMgrFromDdd",
0049         verbose = cms.untracked.bool(False),
0050         level   = cms.untracked.int32(14)
0051 ))
0052 
0053 process.dump = cms.EDAnalyzer("DumpSimGeometry",
0054                               outputFileName = cms.untracked.string(outFile))
0055 
0056 process.p = cms.Path(process.dump)