File indexing completed on 2023-03-17 11:10:34
0001 import FWCore.ParameterSet.Config as cms
0002
0003 class ValidFFTJetLUT:
0004 """
0005 A class which contains the info about a valid combination
0006 of ES record types and ES producer type for FFTJet lookup tables
0007 """
0008 def __init__(self, basename):
0009 self.basename = basename
0010 self.dbTag = "FFT" + basename + "TableDBTag"
0011 self.dbRecord = "FFT" + basename + "ParametersRcd"
0012 self.LUTRecord = "FFT" + basename + "TableRcd"
0013 self.esProducer = "FFT" + basename + "TableESProducer"
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 fftjet_lut_types = {
0032 "EtaFlatteningFactors" : ValidFFTJetLUT("EtaFlatteningFactors"),
0033 "PileupRhoCalibration" : ValidFFTJetLUT("PileupRhoCalibration"),
0034 "PileupRhoEtaDependence" : ValidFFTJetLUT("PileupRhoEtaDependence"),
0035 "LUT0" : ValidFFTJetLUT("LUT0"),
0036 "LUT1" : ValidFFTJetLUT("LUT1"),
0037 "LUT2" : ValidFFTJetLUT("LUT2"),
0038 "LUT3" : ValidFFTJetLUT("LUT3"),
0039 "LUT4" : ValidFFTJetLUT("LUT4"),
0040 "LUT5" : ValidFFTJetLUT("LUT5"),
0041 "LUT6" : ValidFFTJetLUT("LUT6"),
0042 "LUT7" : ValidFFTJetLUT("LUT7"),
0043 "LUT8" : ValidFFTJetLUT("LUT8"),
0044 "LUT9" : ValidFFTJetLUT("LUT9"),
0045 "LUT10" : ValidFFTJetLUT("LUT10"),
0046 "LUT11" : ValidFFTJetLUT("LUT11"),
0047 "LUT12" : ValidFFTJetLUT("LUT12"),
0048 "LUT13" : ValidFFTJetLUT("LUT13"),
0049 "LUT14" : ValidFFTJetLUT("LUT14"),
0050 "LUT15" : ValidFFTJetLUT("LUT15")
0051 }
0052
0053
0054
0055
0056
0057
0058
0059 def configure_fftjetlut_esproducer(sequenceTag):
0060
0061
0062 esProducer = fftjet_lut_types[sequenceTag].esProducer
0063 config = cms.ESProducer(
0064 esProducer,
0065 tables = cms.VPSet(
0066 cms.PSet(
0067 name = cms.string('.*'),
0068 nameIsRegex = cms.bool(True),
0069 category = cms.string('.*'),
0070 categoryIsRegex = cms.bool(True)
0071 )
0072 ),
0073 isArchiveCompressed = cms.bool(False),
0074 verbose = cms.untracked.bool(False)
0075 )
0076 return (config, esProducer)
0077
0078
0079
0080
0081
0082
0083 def configure_fftjetlut_pooldbessource(process, sequenceTag):
0084 config = cms.ESSource(
0085 "PoolDBESSource",
0086 process.CondDBCommon,
0087 toGet = cms.VPSet(cms.PSet(
0088 record = cms.string(fftjet_lut_types[sequenceTag].dbRecord),
0089 tag = cms.string(fftjet_lut_types[sequenceTag].dbTag),
0090 ))
0091 )
0092 sourceName = "FFT" + sequenceTag + "DBESSource"
0093 setattr(process, sourceName, config)
0094 return