Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-20 22:40:15

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun recHitClient_cfg.py geometry=D99
0004 #
0005 #   Options for geometry D98, D99, D108, D94, D103, D104, D106, D107, D108,
0006 #                        D109, D110, D111, D112, D113
0007 #
0008 ###############################################################################
0009 import FWCore.ParameterSet.Config as cms
0010 import os, sys, importlib, re
0011 import FWCore.ParameterSet.VarParsing as VarParsing
0012 
0013 ####################################################################
0014 ### SETUP OPTIONS
0015 options = VarParsing.VarParsing('standard')
0016 options.register('geometry',
0017                  "D99",
0018                   VarParsing.VarParsing.multiplicity.singleton,
0019                   VarParsing.VarParsing.varType.string,
0020                   "geometry of operations: D98, D99, D108, D94, D103, D104, D106, D107, D108, D109, D110, D111, D112, D113")
0021 
0022 ### get and parse the command line arguments
0023 options.parseArguments()
0024 
0025 print(options)
0026 
0027 ####################################################################
0028 # Use the options
0029 
0030 if (options.geometry == "D94"):
0031     from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0032     process = cms.Process('Client',Phase2C20I13M9)
0033 elif (options.geometry == "D104"):
0034     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0035     process = cms.Process('Client',PhaseC22I13M9)
0036 elif (options.geometry == "D106"):
0037     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0038     process = cms.Process('Client',PhaseC22I13M9)
0039 elif (options.geometry == "D109"):
0040     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0041     process = cms.Process('Client',PhaseC22I13M9)
0042 else:
0043     from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0044     process = cms.Process('Client',Phase2C17I13M9)
0045 
0046 geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
0047 fileInput = "file:RecHitVal" + options.geometry + ".root"
0048 
0049 print("Geometry file: ", geomFile)
0050 print("Input file:    ", fileInput)
0051 
0052 process.load("Configuration.StandardSequences.Reconstruction_cff")
0053 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0054 process.load(geomFile)
0055 process.load('FWCore.MessageService.MessageLogger_cfi')
0056 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0057 
0058 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0059 from Configuration.AlCa.GlobalTag import GlobalTag
0060 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0061 
0062 process.load("Validation.HGCalValidation.HGCalRecHitsClient_cff")
0063 process.hgcalRecHitClientEE.Verbosity     = 2
0064 process.hgcalRecHitClientHEF.Verbosity    = 2
0065 process.hgcalRecHitClientHEB.Verbosity    = 2
0066 
0067 process.load("DQMServices.Core.DQM_cfg")
0068 
0069 # summary
0070 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) ## 
0071 
0072 process.maxEvents = cms.untracked.PSet(
0073     input = cms.untracked.int32(-1)
0074 )
0075 
0076 process.source = cms.Source("PoolSource",
0077                             fileNames = cms.untracked.vstring(fileInput)
0078 )
0079 
0080 
0081 process.load("Configuration.StandardSequences.EDMtoMEAtRunEnd_cff")
0082 process.dqmSaver.referenceHandling = cms.untracked.string('all')
0083 
0084 cmssw_version = os.environ.get('CMSSW_VERSION','CMSSW_X_Y_Z')
0085 Workflow = '/HGCalValidation/'+'Harvesting/'+str(cmssw_version)
0086 process.dqmSaver.workflow = Workflow
0087 
0088 process.load("Validation.HGCalValidation.HGCalRecHitsClient_cfi")
0089 
0090 process.p = cms.Path(process.EDMtoME *
0091                      process.hgcalRecHitClientEE *
0092                      process.hgcalRecHitClientHEF *
0093                      process.hgcalRecHitClientHEB *
0094                      process.dqmSaver)