Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-02-14 04:12:18

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