Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalWaferValidation_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 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 if (options.geometry == "D115"):
0029     from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0030     process = cms.Process('WaferValidation',Phase2C20I13M9)
0031 elif (options.geometry == "D104"):
0032     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0033     process = cms.Process('WaferValidation',PhaseC22I13M9)
0034 elif (options.geometry == "D106"):
0035     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0036     process = cms.Process('WaferValidation',PhaseC22I13M9)
0037 elif (options.geometry == "D109"):
0038     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0039     process = cms.Process('WaferValidation',PhaseC22I13M9)
0040 elif (options.geometry == "D111"):
0041     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0042     process = cms.Process('WaferValidation',PhaseC22I13M9)
0043 elif (options.geometry == "D112"):
0044     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0045     process = cms.Process('WaferValidation',PhaseC22I13M9)
0046 elif (options.geometry == "D113"):
0047     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0048     process = cms.Process('WaferValidation',PhaseC22I13M9)
0049 else:
0050     from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0051     process = cms.Process('WaferValidation',Phase2C17I13M9)
0052 
0053 geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
0054 if (options.geometry == "D98"):
0055     fileName = 'Validation/HGCalValidation/data/geomnew_corrected_360_V1.txt'
0056 else:
0057     fileName = 'Validation/HGCalValidation/data/geomnew_corrected_360_V2.txt'
0058 
0059 print("Geometry file: ", geomFile)
0060 print("File Name:     ", fileName)
0061 
0062 process.load(geomFile)
0063 process.load('Validation.HGCalValidation.hgcalWaferValidation_cfi')
0064 process.hgcalWaferValidation.GeometryFileName = cms.FileInPath(fileName)
0065 
0066 process.load("FWCore.MessageService.MessageLogger_cfi")
0067 process.MessageLogger = cms.Service("MessageLogger",
0068    destinations   = cms.untracked.vstring('cout'),
0069    cout           = cms.untracked.PSet(
0070                         threshold  = cms.untracked.string('INFO')
0071                         #threshold  = cms.untracked.string('WARNING')
0072                     ),
0073 )
0074 
0075 process.source = cms.Source("EmptySource")
0076 
0077 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0078 
0079 
0080 process.p = cms.Path(process.hgcalWaferValidation)