1 import FWCore.ParameterSet.Config
as cms
5 adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
6 adcNbitsBH = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
13 STC_SIZE_CUSTOM_PERLAYER_100 = ([4] +
14 [4]*EE_DR_GROUP + [4]*EE_DR_GROUP + [4]*EE_DR_GROUP + [4]*EE_DR_GROUP +
15 [4]*FH_DR_GROUP + [4]*FH_DR_GROUP +
17 STC_SIZE_CUSTOM_PERLAYER_200 = ([16] +
18 [16]*EE_DR_GROUP + [16]*EE_DR_GROUP + [16]*EE_DR_GROUP + [16]*EE_DR_GROUP +
19 [16]*FH_DR_GROUP + [16]*FH_DR_GROUP +
21 STC_SIZE_CUSTOM_PERLAYER_300 = STC_SIZE_CUSTOM_PERLAYER_200
22 STC_SIZE_CUSTOM_PERLAYER_SCIN = STC_SIZE_CUSTOM_PERLAYER_200
25 CTC_SIZE = ( [2]*(MAX_LAYERS+1)*4)
26 STC_SIZE = ( [4]*(MAX_LAYERS+1)+ [16]*(MAX_LAYERS+1)*3 )
29 threshold_conc_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
30 Method = cms.vstring([
'thresholdSelect']*3),
31 threshold_silicon = cms.double(2.),
32 threshold_scintillator = cms.double(2.),
33 coarsenTriggerCells = cms.vuint32(0,0,0),
34 fixedDataSizePerHGCROC = cms.bool(
False),
35 allTrigCellsInTrigSums = cms.bool(
True),
36 ctcSize = cms.vuint32(CTC_SIZE),
43 bestchoice_ndata_centralized = [
44 13, 42, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
45 13, 40, 74, 80, 114, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46 12, 39, 72, 82, 116, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
47 12, 26, 53, 80, 114, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
48 12, 25, 52, 79, 112, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
49 0, 24, 51, 78, 111, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
50 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
51 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
57 bestchoice_ndata_decentralized = [
58 1, 4, 6, 9, 14, 18, 23, 28, 32, 37, 41, 46, 48, 0, 0, 0,
59 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
61 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
62 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
63 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
64 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
65 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
69 superTCCompression_proc = cms.PSet(exponentBits = cms.uint32(4),
70 mantissaBits = cms.uint32(5),
71 truncationBits = cms.uint32(0),
72 rounding = cms.bool(
True),
75 coarseTCCompression_proc = cms.PSet(exponentBits = cms.uint32(4),
76 mantissaBits = cms.uint32(3),
77 truncationBits = cms.uint32(0),
78 rounding = cms.bool(
True),
82 best_conc_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
83 Method = cms.vstring([
'bestChoiceSelect']*3),
84 NData = cms.vuint32(bestchoice_ndata_decentralized),
85 coarsenTriggerCells = cms.vuint32(0,0,0),
86 fixedDataSizePerHGCROC = cms.bool(
False),
87 allTrigCellsInTrigSums = cms.bool(
False),
88 coarseTCCompression = coarseTCCompression_proc.clone(),
89 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
90 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
91 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
92 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
93 ctcSize = cms.vuint32(CTC_SIZE),
96 supertc_conc_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
97 Method = cms.vstring([
'superTriggerCellSelect']*3),
98 type_energy_division = cms.string(
'superTriggerCell'),
99 stcSize = cms.vuint32(STC_SIZE),
100 ctcSize = cms.vuint32(CTC_SIZE),
101 fixedDataSizePerHGCROC = cms.bool(
False),
102 allTrigCellsInTrigSums = cms.bool(
False),
103 coarsenTriggerCells = cms.vuint32(0,0,0),
104 superTCCompression = superTCCompression_proc.clone(),
105 coarseTCCompression = coarseTCCompression_proc.clone(),
106 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
107 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
108 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
109 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
112 custom_conc_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
113 Method = cms.vstring(
'bestChoiceSelect',
'superTriggerCellSelect',
'superTriggerCellSelect'),
114 NData = cms.vuint32(bestchoice_ndata_decentralized),
115 threshold_silicon = cms.double(2.),
116 threshold_scintillator = cms.double(2.),
117 coarsenTriggerCells = cms.vuint32(0,0,0),
118 fixedDataSizePerHGCROC = cms.bool(
False),
119 allTrigCellsInTrigSums = cms.bool(
False),
120 type_energy_division = cms.string(
'superTriggerCell'),
121 stcSize = cms.vuint32(STC_SIZE),
122 ctcSize = cms.vuint32(CTC_SIZE),
123 superTCCompression = superTCCompression_proc.clone(),
124 coarseTCCompression = coarseTCCompression_proc.clone(),
125 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
126 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
127 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
128 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
132 coarsetc_onebitfraction_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
133 Method = cms.vstring([
'superTriggerCellSelect']*3),
134 type_energy_division = cms.string(
'oneBitFraction'),
135 stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3),
136 ctcSize = cms.vuint32(CTC_SIZE),
137 fixedDataSizePerHGCROC = cms.bool(
True),
138 allTrigCellsInTrigSums = cms.bool(
False),
139 coarsenTriggerCells = cms.vuint32(0,0,0),
140 oneBitFractionThreshold = cms.double(0.125),
141 oneBitFractionLowValue = cms.double(0.0625),
142 oneBitFractionHighValue = cms.double(0.25),
143 superTCCompression = superTCCompression_proc.clone(),
144 coarseTCCompression = coarseTCCompression_proc.clone(),
145 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
146 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
147 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
148 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
152 coarsetc_equalshare_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
153 Method = cms.vstring([
'superTriggerCellSelect']*3),
154 type_energy_division = cms.string(
'equalShare'),
155 stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3),
156 ctcSize = cms.vuint32(CTC_SIZE),
157 fixedDataSizePerHGCROC = cms.bool(
True),
158 allTrigCellsInTrigSums = cms.bool(
False),
159 coarsenTriggerCells = cms.vuint32(0,0,0),
160 superTCCompression = superTCCompression_proc.clone(),
161 coarseTCCompression = coarseTCCompression_proc.clone(),
162 superTCCalibration_ee = vfe_proc.calibrationCfg_ee.clone(),
163 superTCCalibration_hesi = vfe_proc.calibrationCfg_hesi.clone(),
164 superTCCalibration_hesc = vfe_proc.calibrationCfg_hesc.clone(),
165 superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(),
169 autoencoder_triggerCellRemap = [0,16, 32,
186 autoEncoder_bitsPerOutputLink = cms.vint32([0, 1, 3, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])
188 autoEncoder_training_2eLinks = cms.PSet(encoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/encoder_2eLinks_PUdriven_constantgraph.pb'),
189 decoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/decoder_2eLinks_PUdriven_constantgraph.pb'))
191 autoEncoder_training_3eLinks = cms.PSet(encoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/encoder_3eLinks_PUdriven_constantgraph.pb'),
192 decoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/decoder_3eLinks_PUdriven_constantgraph.pb'))
194 autoEncoder_training_4eLinks = cms.PSet(encoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/encoder_4eLinks_PUdriven_constantgraph.pb'),
195 decoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/decoder_4eLinks_PUdriven_constantgraph.pb'))
197 autoEncoder_training_5eLinks = cms.PSet(encoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/encoder_5eLinks_PUdriven_constantgraph.pb'),
198 decoderModelFile = cms.FileInPath(
'L1Trigger/L1THGCal/data/decoder_5eLinks_PUdriven_constantgraph.pb'))
200 linkToGraphMapping = [0,0,0,1,2,3,3,3,3,3,3,3,3,3,3]
202 autoEncoder_conc_proc = cms.PSet(ProcessorName = cms.string(
'HGCalConcentratorProcessorSelection'),
203 Method = cms.vstring([
'autoEncoder',
'autoEncoder',
'thresholdSelect']),
204 cellRemap = cms.vint32(autoencoder_triggerCellRemap),
205 cellRemapNoDuplicates = cms.vint32(autoencoder_triggerCellRemap),
206 encoderShape = cms.vuint32(1,4,4,3),
207 decoderShape = cms.vuint32(1,16),
208 nBitsPerInput = cms.int32(8),
209 maxBitsPerOutput = cms.int32(9),
210 bitsPerLink = autoEncoder_bitsPerOutputLink,
211 modelFiles = cms.VPSet([autoEncoder_training_2eLinks, autoEncoder_training_3eLinks, autoEncoder_training_4eLinks, autoEncoder_training_5eLinks]),
212 linkToGraphMap = cms.vuint32(linkToGraphMapping),
213 zeroSuppresionThreshold = cms.double(0.1),
214 bitShiftNormalization = cms.bool(
True),
215 saveEncodedValues = cms.bool(
False),
216 preserveModuleSum = cms.bool(
True),
217 threshold_silicon = cms.double(2.),
218 threshold_scintillator = cms.double(2.),
219 type_energy_division = supertc_conc_proc.type_energy_division,
220 stcSize = supertc_conc_proc.stcSize,
221 ctcSize = supertc_conc_proc.ctcSize,
222 fixedDataSizePerHGCROC = supertc_conc_proc.fixedDataSizePerHGCROC,
223 allTrigCellsInTrigSums = supertc_conc_proc.allTrigCellsInTrigSums,
224 coarsenTriggerCells = supertc_conc_proc.coarsenTriggerCells,
225 superTCCompression = superTCCompression_proc.clone(),
226 coarseTCCompression = coarseTCCompression_proc.clone(),
227 superTCCalibration = vfe_proc.clone(),
233 from Configuration.Eras.Modifier_phase2_hgcalV10_cff
import phase2_hgcalV10
238 phase2_hgcalV10.toModify(threshold_conc_proc,
239 threshold_silicon=1.35,
240 threshold_scintillator=1.35,
244 l1tHGCalConcentratorProducer = cms.EDProducer(
245 "HGCalConcentratorProducer",
246 InputTriggerCells = cms.InputTag(
'l1tHGCalVFEProducer:HGCalVFEProcessorSums'),
247 InputTriggerSums = cms.InputTag(
'l1tHGCalVFEProducer:HGCalVFEProcessorSums'),
248 ProcessorParameters = threshold_conc_proc.clone()
252 l1tHGCalConcentratorProducerHFNose = l1tHGCalConcentratorProducer.clone(
253 InputTriggerCells = cms.InputTag(
'l1tHFnoseVFEProducer:HGCalVFEProcessorSums'),
254 InputTriggerSums = cms.InputTag(
'l1tHFnoseVFEProducer:HGCalVFEProcessorSums')