File indexing completed on 2024-07-18 00:48:12
0001
0002
0003
0004
0005
0006
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
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
0023 options.parseArguments()
0024
0025 print(options)
0026
0027
0028
0029 if (options.geometry == "D115"):
0030 from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0031 process = cms.Process('WaferStudy',Phase2C20I13M9)
0032 elif (options.geometry == "D104"):
0033 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0034 process = cms.Process('WaferStudy',PhaseC22I13M9)
0035 elif (options.geometry == "D106"):
0036 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0037 process = cms.Process('WaferStudy',PhaseC22I13M9)
0038 elif (options.geometry == "D109"):
0039 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0040 process = cms.Process('WaferStudy',PhaseC22I13M9)
0041 elif (options.geometry == "D111"):
0042 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0043 process = cms.Process('WaferStudy',PhaseC22I13M9)
0044 elif (options.geometry == "D112"):
0045 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0046 process = cms.Process('WaferStudy',PhaseC22I13M9)
0047 elif (options.geometry == "D113"):
0048 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0049 process = cms.Process('WaferStudy',PhaseC22I13M9)
0050 else:
0051 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0052 process = cms.Process('WaferStudy',Phase2C17I13M9)
0053
0054 geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
0055 fileInput = "file:step2" + options.geometry + "tt.root"
0056 fileName = "hgcWafer" + options.geometry + "tt.root"
0057
0058 print("Geometry file: ", geomFile)
0059 print("Input file: ", fileInput)
0060 print("Output file: ", fileName)
0061
0062 process.load(geomFile)
0063 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0064 process.load("Configuration.StandardSequences.MagneticField_cff")
0065 process.load('FWCore.MessageService.MessageLogger_cfi')
0066 process.load('Configuration.StandardSequences.RawToDigi_cff')
0067 process.load('Validation.HGCalValidation.hgcalWaferStudy_cfi')
0068 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0069 from Configuration.AlCa.GlobalTag import GlobalTag
0070 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0071
0072 if hasattr(process,'MessageLogger'):
0073 process.MessageLogger.HGCalValidation=dict()
0074
0075 process.source = cms.Source("PoolSource",
0076 fileNames = cms.untracked.vstring(fileInput)
0077 )
0078
0079 process.maxEvents = cms.untracked.PSet(
0080 input = cms.untracked.int32(-1)
0081 )
0082
0083 process.TFileService = cms.Service("TFileService",
0084 fileName = cms.string(fileName),
0085 closeFileFast = cms.untracked.bool(True)
0086 )
0087
0088 process.raw2digi_step = cms.Path(process.RawToDigi)
0089 process.analysis_step = cms.Path(process.hgcalWaferStudy)
0090 process.hgcalWaferStudy.verbosity = 1
0091 process.hgcalWaferStudy.nBinHit = 60
0092 process.hgcalWaferStudy.nBinDig = 60
0093 process.hgcalWaferStudy.layerMinSim = cms.untracked.vint32(1,1)
0094 process.hgcalWaferStudy.layerMaxSim = cms.untracked.vint32(10,10)
0095 process.hgcalWaferStudy.layerMinDig = cms.untracked.vint32(1,1)
0096 process.hgcalWaferStudy.layerMaxDig = cms.untracked.vint32(10,10)
0097
0098
0099 process.schedule = cms.Schedule(process.raw2digi_step,process.analysis_step)