File indexing completed on 2024-08-06 22:36:38
0001
0002
0003
0004
0005
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
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016 "V17",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "geometry of operations: V16, V17, V17Shift, V17n, V18, V19")
0020
0021
0022 options.parseArguments()
0023
0024 print(options)
0025
0026
0027
0028
0029 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0030 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0031
0032 process = cms.Process('DUMP',Phase2C17I13M9,dd4hep)
0033
0034 geomFile = "Geometry/HGCalCommonData/data/dd4hep/testHGCal" + options.type + ".xml"
0035 outFile = "hgcal" + options.type + "DD4hep.root"
0036
0037 print("Geometry file Name: ", geomFile)
0038 print("Dump file Name: ", outFile)
0039
0040 process.load('FWCore.MessageService.MessageLogger_cfi')
0041 process.source = cms.Source("EmptySource")
0042 process.maxEvents = cms.untracked.PSet(
0043 input = cms.untracked.int32(1)
0044 )
0045
0046 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0047 if hasattr(process,'MessageLogger'):
0048 process.MessageLogger.HGCalGeom=dict()
0049
0050 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0051 confGeomXMLFiles = cms.FileInPath(geomFile),
0052 appendToDataLabel = cms.string('DDHGCal')
0053 )
0054
0055 process.testDump = cms.EDAnalyzer("DDTestDumpFile",
0056 outputFileName = cms.untracked.string(outFile),
0057 DDDetector = cms.ESInputTag('','DDHGCal')
0058 )
0059
0060
0061 process.p = cms.Path(process.testDump)