Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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