Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-15 22:20:35

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHcalParametersFromDD4HepAnalyzer_cfg.py geometry=Run3
0004 #
0005 #   Options for geometry Run3, D86, D88
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('geometry',
0016                  "Run3",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: Run3, D86, D88")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 
0029 if (options.geometry == "D86"):
0030     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0031     from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0032     process = cms.Process("HcalParametersTest",Phase2C11M9,dd4hep)
0033     process.load('Configuration.Geometry.GeometryDD4hepExtended2026D86Reco_cff')
0034 elif (options.geometry == "D88"):
0035     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0036     from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0037     process = cms.Process("HcalParametersTest",Phase2C11M9,dd4hep)
0038     process.load('Configuration.Geometry.GeometryDD4hepExtended2026D88Reco_cff')
0039 else:
0040     from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
0041     process = cms.Process("HcalParametersTest",Run3_dd4hep)
0042     process.load("Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff")
0043 
0044 process.load('FWCore.MessageService.MessageLogger_cfi')
0045 
0046 if hasattr(process,'MessageLogger'):
0047     process.MessageLogger.HCalGeom=dict()
0048     process.MessageLogger.Geometry=dict()
0049 
0050 process.source = cms.Source("EmptySource")
0051 process.maxEvents = cms.untracked.PSet(
0052     input = cms.untracked.int32(1)
0053     )
0054 
0055 process.hpa = cms.EDAnalyzer("HcalParametersAnalyzer")
0056 
0057 process.Timing = cms.Service("Timing")
0058 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0059 
0060 process.p1 = cms.Path(process.hpa)