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