Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:38

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCalWaferHitCheck_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                  "D93",
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:step1" + options.geometry + "tt.root"
0046 
0047 print("Geometry file: ", geomFile)
0048 print("Input file:    ", fileInput)
0049 
0050 process.load(geomFile)
0051 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0052 process.load("Configuration.StandardSequences.MagneticField_cff")
0053 process.load('FWCore.MessageService.MessageLogger_cfi')
0054 process.load('Configuration.StandardSequences.RawToDigi_cff')
0055 process.load('Validation.HGCalValidation.hgcWaferHitCheck_cfi')
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 if hasattr(process,'MessageLogger'):
0061     process.MessageLogger.HGCalValidation=dict()
0062 #   process.MessageLogger.HGCalGeom=dict()
0063 
0064 process.source = cms.Source("PoolSource",
0065                             fileNames = cms.untracked.vstring(fileInput)
0066                             )
0067 
0068 process.maxEvents = cms.untracked.PSet(
0069     input = cms.untracked.int32(-1)
0070 )
0071 
0072 process.analysis_step = cms.Path(process.hgcalWaferHitCheckEE)
0073 #process.analysis_step = cms.Path(process.hgcalWaferHitCheckHEF)
0074 process.hgcalWaferHitCheckEE.verbosity = 1
0075 process.hgcalWaferHitCheckHEF.verbosity = 1
0076 #process.hgcalWaferHitCheckEE.inputType = 2
0077 #process.hgcalWaferHitCheckHEF.inputType = 2
0078 #process.hgcalWaferHitCheckEE.source = cms.InputTag("simHGCalUnsuppressedDigis", "EE")
0079 #process.hgcalWaferHitCheckHEF.source = cms.InputTag("simHGCalUnsuppressedDigis","HEfront")
0080 #process.hgcalWaferHitCheckEE.inputType = 3                                   
0081 #process.hgcalWaferHitCheckHEF.inputType = 3
0082 #process.hgcalWaferHitCheckEE.source = cms.InputTag("HGCalRecHit", "HGCEERecHits")
0083 #process.hgcalWaferHitCheckHEF.source = cms.InputTag("HGCalRecHit", "HGCHEFRecHits")
0084 
0085 # Schedule definition
0086 process.schedule = cms.Schedule(process.analysis_step)