File indexing completed on 2023-12-05 03:12:11
0001 import FWCore.ParameterSet.Config as cms
0002 import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam
0003
0004
0005 adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
0006 adcNbitsBH = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
0007
0008 EE_DR_GROUP = 7
0009 FH_DR_GROUP = 6
0010 BH_DR_GROUP = 12
0011 MAX_LAYERS = 52
0012
0013 STC_SIZE_CUSTOM_PERLAYER_100 = ([4] +
0014 [4]*EE_DR_GROUP + [4]*EE_DR_GROUP + [4]*EE_DR_GROUP + [4]*EE_DR_GROUP +
0015 [4]*FH_DR_GROUP + [4]*FH_DR_GROUP +
0016 [4]*BH_DR_GROUP)
0017 STC_SIZE_CUSTOM_PERLAYER_200 = ([16] +
0018 [16]*EE_DR_GROUP + [16]*EE_DR_GROUP + [16]*EE_DR_GROUP + [16]*EE_DR_GROUP +
0019 [16]*FH_DR_GROUP + [16]*FH_DR_GROUP +
0020 [16]*BH_DR_GROUP)
0021 STC_SIZE_CUSTOM_PERLAYER_300 = STC_SIZE_CUSTOM_PERLAYER_200
0022 STC_SIZE_CUSTOM_PERLAYER_SCIN = STC_SIZE_CUSTOM_PERLAYER_200
0023
0024
0025 CTC_SIZE = ( [2]*(MAX_LAYERS+1)*4)
0026 STC_SIZE = ( [4]*(MAX_LAYERS+1)+ [16]*(MAX_LAYERS+1)*3 )
0027
0028
0029 threshold_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0030 Method = cms.vstring(['thresholdSelect']*3),
0031 threshold_silicon = cms.double(2.),
0032 threshold_scintillator = cms.double(2.),
0033 coarsenTriggerCells = cms.vuint32(0,0,0),
0034 fixedDataSizePerHGCROC = cms.bool(False),
0035 allTrigCellsInTrigSums = cms.bool(True),
0036 ctcSize = cms.vuint32(CTC_SIZE),
0037 )
0038
0039
0040
0041
0042
0043 bestchoice_ndata_centralized = [
0044 13, 42, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0045 13, 40, 74, 80, 114, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0046 12, 39, 72, 82, 116, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0047 12, 26, 53, 80, 114, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0048 12, 25, 52, 79, 112, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0049 0, 24, 51, 78, 111, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0052 ]
0053
0054
0055
0056
0057 bestchoice_ndata_decentralized = [
0058 1, 4, 6, 9, 14, 18, 23, 28, 32, 37, 41, 46, 48, 0, 0, 0,
0059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0066 ]
0067
0068
0069 superTCCompression_proc = cms.PSet(exponentBits = cms.uint32(4),
0070 mantissaBits = cms.uint32(5),
0071 truncationBits = cms.uint32(0),
0072 rounding = cms.bool(True),
0073 )
0074
0075 coarseTCCompression_proc = cms.PSet(exponentBits = cms.uint32(4),
0076 mantissaBits = cms.uint32(3),
0077 truncationBits = cms.uint32(0),
0078 rounding = cms.bool(True),
0079 )
0080
0081 from L1Trigger.L1THGCal.l1tHGCalVFEProducer_cfi import vfe_proc
0082 best_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0083 Method = cms.vstring(['bestChoiceSelect']*3),
0084 NData = cms.vuint32(bestchoice_ndata_decentralized),
0085 coarsenTriggerCells = cms.vuint32(0,0,0),
0086 fixedDataSizePerHGCROC = cms.bool(False),
0087 allTrigCellsInTrigSums = cms.bool(False),
0088 coarseTCCompression = coarseTCCompression_proc.clone(),
0089 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
0090 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
0091 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
0092 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
0093 ctcSize = cms.vuint32(CTC_SIZE),
0094 )
0095
0096 supertc_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0097 Method = cms.vstring(['superTriggerCellSelect']*3),
0098 type_energy_division = cms.string('superTriggerCell'),
0099 stcSize = cms.vuint32(STC_SIZE),
0100 ctcSize = cms.vuint32(CTC_SIZE),
0101 fixedDataSizePerHGCROC = cms.bool(False),
0102 allTrigCellsInTrigSums = cms.bool(False),
0103 coarsenTriggerCells = cms.vuint32(0,0,0),
0104 superTCCompression = superTCCompression_proc.clone(),
0105 coarseTCCompression = coarseTCCompression_proc.clone(),
0106 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
0107 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
0108 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
0109 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
0110 )
0111
0112 custom_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0113 Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'),
0114 NData = cms.vuint32(bestchoice_ndata_decentralized),
0115 threshold_silicon = cms.double(2.),
0116 threshold_scintillator = cms.double(2.),
0117 coarsenTriggerCells = cms.vuint32(0,0,0),
0118 fixedDataSizePerHGCROC = cms.bool(False),
0119 allTrigCellsInTrigSums = cms.bool(False),
0120 type_energy_division = cms.string('superTriggerCell'),
0121 stcSize = cms.vuint32(STC_SIZE),
0122 ctcSize = cms.vuint32(CTC_SIZE),
0123 superTCCompression = superTCCompression_proc.clone(),
0124 coarseTCCompression = coarseTCCompression_proc.clone(),
0125 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
0126 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
0127 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
0128 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
0129 )
0130
0131
0132 coarsetc_onebitfraction_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0133 Method = cms.vstring(['superTriggerCellSelect']*3),
0134 type_energy_division = cms.string('oneBitFraction'),
0135 stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3),
0136 ctcSize = cms.vuint32(CTC_SIZE),
0137 fixedDataSizePerHGCROC = cms.bool(True),
0138 allTrigCellsInTrigSums = cms.bool(False),
0139 coarsenTriggerCells = cms.vuint32(0,0,0),
0140 oneBitFractionThreshold = cms.double(0.125),
0141 oneBitFractionLowValue = cms.double(0.0625),
0142 oneBitFractionHighValue = cms.double(0.25),
0143 superTCCompression = superTCCompression_proc.clone(),
0144 coarseTCCompression = coarseTCCompression_proc.clone(),
0145 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
0146 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
0147 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
0148 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
0149 )
0150
0151
0152 coarsetc_equalshare_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0153 Method = cms.vstring(['superTriggerCellSelect']*3),
0154 type_energy_division = cms.string('equalShare'),
0155 stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3),
0156 ctcSize = cms.vuint32(CTC_SIZE),
0157 fixedDataSizePerHGCROC = cms.bool(True),
0158 allTrigCellsInTrigSums = cms.bool(False),
0159 coarsenTriggerCells = cms.vuint32(0,0,0),
0160 superTCCompression = superTCCompression_proc.clone(),
0161 coarseTCCompression = coarseTCCompression_proc.clone(),
0162 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
0163 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
0164 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
0165 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
0166 )
0167
0168
0169 autoencoder_triggerCellRemap = [0,16, 32,
0170 1,17, 33,
0171 2,18, 34,
0172 3,19, 35,
0173 4,20, 36,
0174 5,21, 37,
0175 6,22, 38,
0176 7,23, 39,
0177 8,24, 40,
0178 9,25, 41,
0179 10,26, 42,
0180 11,27, 43,
0181 12,28, 44,
0182 13,29, 45,
0183 14,30, 46,
0184 15,31, 47]
0185
0186 autoEncoder_bitsPerOutputLink = cms.vint32([0, 1, 3, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])
0187
0188 autoEncoder_training_2eLinks = cms.PSet(encoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/encoder_2eLinks_PUdriven_constantgraph.pb'),
0189 decoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/decoder_2eLinks_PUdriven_constantgraph.pb'))
0190
0191 autoEncoder_training_3eLinks = cms.PSet(encoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/encoder_3eLinks_PUdriven_constantgraph.pb'),
0192 decoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/decoder_3eLinks_PUdriven_constantgraph.pb'))
0193
0194 autoEncoder_training_4eLinks = cms.PSet(encoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/encoder_4eLinks_PUdriven_constantgraph.pb'),
0195 decoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/decoder_4eLinks_PUdriven_constantgraph.pb'))
0196
0197 autoEncoder_training_5eLinks = cms.PSet(encoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/encoder_5eLinks_PUdriven_constantgraph.pb'),
0198 decoderModelFile = cms.FileInPath('L1Trigger/L1THGCal/data/decoder_5eLinks_PUdriven_constantgraph.pb'))
0199
0200 linkToGraphMapping = [0,0,0,1,2,3,3,3,3,3,3,3,3,3,3]
0201
0202 autoEncoder_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'),
0203 Method = cms.vstring(['autoEncoder','autoEncoder','thresholdSelect']),
0204 cellRemap = cms.vint32(autoencoder_triggerCellRemap),
0205 cellRemapNoDuplicates = cms.vint32(autoencoder_triggerCellRemap),
0206 encoderShape = cms.vuint32(1,4,4,3),
0207 decoderShape = cms.vuint32(1,16),
0208 nBitsPerInput = cms.int32(8),
0209 maxBitsPerOutput = cms.int32(9),
0210 bitsPerLink = autoEncoder_bitsPerOutputLink,
0211 modelFiles = cms.VPSet([autoEncoder_training_2eLinks, autoEncoder_training_3eLinks, autoEncoder_training_4eLinks, autoEncoder_training_5eLinks]),
0212 linkToGraphMap = cms.vuint32(linkToGraphMapping),
0213 zeroSuppresionThreshold = cms.double(0.1),
0214 bitShiftNormalization = cms.bool(True),
0215 saveEncodedValues = cms.bool(False),
0216 preserveModuleSum = cms.bool(True),
0217 threshold_silicon = cms.double(2.),
0218 threshold_scintillator = cms.double(2.),
0219 type_energy_division = supertc_conc_proc.type_energy_division,
0220 stcSize = supertc_conc_proc.stcSize,
0221 ctcSize = supertc_conc_proc.ctcSize,
0222 fixedDataSizePerHGCROC = supertc_conc_proc.fixedDataSizePerHGCROC,
0223 allTrigCellsInTrigSums = supertc_conc_proc.allTrigCellsInTrigSums,
0224 coarsenTriggerCells = supertc_conc_proc.coarsenTriggerCells,
0225 superTCCompression = superTCCompression_proc.clone(),
0226 coarseTCCompression = coarseTCCompression_proc.clone(),
0227 superTCCalibration = vfe_proc.clone(),
0228 )
0229
0230
0231
0232
0233 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
0234
0235
0236
0237
0238 phase2_hgcalV10.toModify(threshold_conc_proc,
0239 threshold_silicon=1.35,
0240 threshold_scintillator=1.35,
0241 )
0242
0243
0244 l1tHGCalConcentratorProducer = cms.EDProducer(
0245 "HGCalConcentratorProducer",
0246 InputTriggerCells = cms.InputTag('l1tHGCalVFEProducer:HGCalVFEProcessorSums'),
0247 InputTriggerSums = cms.InputTag('l1tHGCalVFEProducer:HGCalVFEProcessorSums'),
0248 ProcessorParameters = threshold_conc_proc.clone()
0249 )
0250
0251
0252 l1tHGCalConcentratorProducerHFNose = l1tHGCalConcentratorProducer.clone(
0253 InputTriggerCells = cms.InputTag('l1tHFnoseVFEProducer:HGCalVFEProcessorSums'),
0254 InputTriggerSums = cms.InputTag('l1tHFnoseVFEProducer:HGCalVFEProcessorSums')
0255 )
0256