File indexing completed on 2024-04-06 12:14:21
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 process = cms.Process("HcalParametersTest")
0013
0014
0015
0016 options = VarParsing.VarParsing('standard')
0017 options.register('geometry',
0018 "",
0019 VarParsing.VarParsing.multiplicity.singleton,
0020 VarParsing.VarParsing.varType.string,
0021 "geometry of operations: 2015, 2016, 2017,2017Plan1, 2018, ")
0022
0023
0024 options.parseArguments()
0025
0026 print(options)
0027
0028
0029
0030
0031 if (options.geometry == "2015"):
0032 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2015.xml"
0033 elif (options.geometry == "2016"):
0034 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2016.xml"
0035 elif (options.geometry == "2017"):
0036 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2017.xml"
0037 elif (options.geometry == "2017Plan1"):
0038 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2017Plan1.xml"
0039 elif (options.geometry == "2018"):
0040 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2018.xml"
0041 else:
0042 fileName = "Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry.xml"
0043
0044 print("Geometry File: ", fileName)
0045
0046 process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff')
0047 process.load('FWCore.MessageService.MessageLogger_cfi')
0048
0049 process.source = cms.Source("EmptySource")
0050 process.maxEvents = cms.untracked.PSet(
0051 input = cms.untracked.int32(1)
0052 )
0053
0054 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0055 confGeomXMLFiles = cms.FileInPath(fileName),
0056 appendToDataLabel = cms.string('')
0057 )
0058
0059 process.DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
0060 appendToDataLabel = cms.string('')
0061 )
0062
0063 process.hpa = cms.EDAnalyzer("HcalParametersAnalyzer")
0064 process.hcalParameters.fromDD4hep = cms.bool(True)
0065 process.hcalSimulationParameters.fromDD4hep = cms.bool(True)
0066
0067 process.Timing = cms.Service("Timing")
0068 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0069
0070 process.p1 = cms.Path(process.hpa)