Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-29 22:16:06

0001 #run with: cmsRun hgcGeomAnalyzer_cfg.py geom=v10
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 from FWCore.ParameterSet.VarParsing import VarParsing
0005 from Configuration.StandardSequences.Eras import eras
0006 
0007 options = VarParsing()
0008 options.register ("geom", "",  VarParsing.multiplicity.singleton, VarParsing.varType.string)
0009 options.parseArguments()
0010 
0011 fileName = "geom_output_"+options.geom
0012 
0013 process = cms.Process("demo",eras.Phase2C11)
0014 
0015 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0016 if options.geom == 'v11':
0017     process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0018 elif options.geom == 'v12':
0019     process.load('Configuration.Geometry.GeometryExtended2026D68Reco_cff')
0020 elif options.geom == 'v13':
0021     process.load('Configuration.Geometry.GeometryExtended202670Reco_cff')
0022 elif options.geom == 'v14':
0023     process.load('Configuration.Geometry.GeometryExtended2026D71Reco_cff')
0024 else:
0025     raise Exception('UNKNOWN GEOMETRY!')
0026 
0027 from Configuration.AlCa.GlobalTag import GlobalTag
0028 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0029 
0030 process.load('FWCore.MessageService.MessageLogger_cfi')
0031 if hasattr(process,'MessageLogger'):
0032     process.MessageLogger.HGCalGeom=dict()
0033     process.MessageLogger.HGCalGeomX=dict()
0034 
0035 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0036 process.source = cms.Source("EmptySource")
0037 
0038 process.plotter = cms.EDAnalyzer("HGCGeomAnalyzer",
0039     fileName = cms.string(fileName+".txt")
0040     )
0041 
0042 process.TFileService = cms.Service("TFileService",
0043                                    fileName = cms.string(fileName+".root")
0044 )
0045 
0046 process.p = cms.Path(process.plotter)