Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-22 23:03:59

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalWaferValidation_cfg.py geometry=D83
0004 #
0005 #   Options for geometry D88, D92, D93
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                  "D93",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: D88, D92, D93")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 ####################################################################
0026 # Use the options
0027 from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0028 process = cms.Process('TestHGCalWaferValidation',Phase2C11M9)
0029 
0030 geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
0031 if (options.geometry == "D88"):
0032     fileName = 'Validation/HGCalValidation/data/geomnew_corrected_360_V1.txt'
0033 else:
0034     fileName = 'Validation/HGCalValidation/data/geomnew_corrected_360_V2.txt'
0035 
0036 print("Geometry file: ", geomFile)
0037 print("File Name:     ", fileName)
0038 
0039 process.load(geomFile)
0040 process.load('Validation.HGCalValidation.hgcalWaferValidation_cfi')
0041 process.hgcalWaferValidation.GeometryFileName = cms.FileInPath(fileName)
0042 
0043 process.load("FWCore.MessageService.MessageLogger_cfi")
0044 process.MessageLogger = cms.Service("MessageLogger",
0045    destinations   = cms.untracked.vstring('cout'),
0046    cout           = cms.untracked.PSet(
0047                         threshold  = cms.untracked.string('INFO')
0048                         #threshold  = cms.untracked.string('WARNING')
0049                     ),
0050 )
0051 
0052 process.source = cms.Source("EmptySource")
0053 
0054 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0055 
0056 
0057 process.p = cms.Path(process.hgcalWaferValidation)