File indexing completed on 2025-05-02 02:40:41
0001
0002
0003
0004
0005
0006
0007
0008 import FWCore.ParameterSet.Config as cms
0009 from FWCore.ParameterSet.VarParsing import VarParsing
0010 from Configuration.StandardSequences.Eras import eras
0011 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0012
0013 options = VarParsing()
0014 options.register ("geom",
0015 "v17",
0016 VarParsing.multiplicity.singleton, VarParsing.varType.string,
0017 "geom of operations: v16, v17, v18, V19")
0018
0019 options.parseArguments()
0020
0021 process = cms.Process("demo",eras.Phase2C17I13M9)
0022
0023 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0024 if options.geom == 'v16':
0025 geomFile = 'Configuration.Geometry.GeometryExtendedRun4D100Reco_cff'
0026 elif options.geom == 'v17':
0027 geomFile = 'Configuration.Geometry.GeometryExtendedRun4D110Reco_cff'
0028 elif options.geom == 'v18':
0029 geomFile = 'Configuration.Geometry.GeometryExtendedRun4D104Reco_cff'
0030 elif options.geom == 'v19':
0031 geomFile = 'Configuration.Geometry.GeometryExtendedRun4D120Reco_cff'
0032 else:
0033 geomFile = 'UNKNOWN GEOMETRY!'
0034 raise Exception(geomFile)
0035
0036 fileName = "geom_output_"+options.geom
0037
0038 print("Geometry file: ", geomFile)
0039 print("Output file: ", fileName)
0040
0041 process.load(geomFile)
0042
0043 from Configuration.AlCa.GlobalTag import GlobalTag
0044 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T25', '')
0045
0046 process.load('FWCore.MessageService.MessageLogger_cfi')
0047 if hasattr(process,'MessageLogger'):
0048 process.MessageLogger.HGCalGeom=dict()
0049 process.MessageLogger.HGCalGeomX=dict()
0050
0051 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0052 process.source = cms.Source("EmptySource")
0053
0054 process.plotter = cms.EDAnalyzer("HGCGeomAnalyzer",
0055 fileName = cms.string(fileName+".txt")
0056 )
0057
0058 process.TFileService = cms.Service("TFileService",
0059 fileName = cms.string(fileName+".root")
0060 )
0061
0062 process.p = cms.Path(process.plotter)