Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-18 00:48:12

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