Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:06

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun dumpHGCalEEDD4hep_cfg.py type=V17
0004 #
0005 #   Options for type V16, V17, V18
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, V18")
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("DumpHGCalEE",Phase2C17I13M9)
0027 
0028 geomFile = "Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalEE" + options.type + "-algorithm.xml"
0029 outFile = "hgcalEE" + options.type + "DD4hep.root"
0030 print("Geometry file: ", geomFile)
0031 print("Output file: ", outFile)
0032 
0033 # import of standard configurations
0034 process.load('FWCore.MessageService.MessageLogger_cfi')
0035 process.source = cms.Source("EmptySource")
0036 process.maxEvents = cms.untracked.PSet(
0037     input = cms.untracked.int32(1)
0038     )
0039 
0040 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0041 if hasattr(process,'MessageLogger'):
0042     process.MessageLogger.HGCalGeom=dict()
0043 
0044 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0045                                             confGeomXMLFiles = cms.FileInPath(geomFile),
0046                                             appendToDataLabel = cms.string('DDHGCalEE')
0047                                             )
0048 
0049 process.testDump = cms.EDAnalyzer("DDTestDumpFile",
0050                                   outputFileName = cms.untracked.string(outFile),
0051                                   DDDetector = cms.ESInputTag('','DDHGCalEE')
0052                                   )
0053 
0054 process.p = cms.Path(process.testDump)