1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
7 from .
import hgcalLayersCalibrationCoefficients_cfi
as layercalibparam
10 feCfg_si = digiparam.hgceeDigitizer.digiCfg.feCfg
11 feCfg_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg
14 triggerCellLsbBeforeCompression_si =
float(feCfg_si.adcSaturation_fC.value())/(2**
float(feCfg_si.adcNbits.value()))
15 triggerCellLsbBeforeCompression_sc =
float(feCfg_sc.adcSaturation_fC.value())/(2**
float(feCfg_sc.adcNbits.value()))
18 linearization_params_si = cms.PSet(
19 linLSB = cms.double(triggerCellLsbBeforeCompression_si),
20 adcsaturation = feCfg_si.adcSaturation_fC,
21 tdcnBits = feCfg_si.tdcNbits,
22 tdcOnset = feCfg_si.tdcOnset_fC,
23 adcnBits = feCfg_si.adcNbits,
24 tdcsaturation = feCfg_si.tdcSaturation_fC,
25 linnBits = cms.uint32(17),
26 oot_coefficients = cms.vdouble(0., 0.),
30 linearization_params_sc = cms.PSet(
31 linLSB = cms.double(triggerCellLsbBeforeCompression_sc),
32 adcsaturation = feCfg_sc.adcSaturation_fC,
33 tdcnBits = feCfg_sc.tdcNbits,
34 tdcOnset = feCfg_sc.tdcOnset_fC,
35 adcnBits = feCfg_sc.adcNbits,
36 tdcsaturation = feCfg_sc.tdcSaturation_fC,
37 linnBits = cms.uint32(17),
38 oot_coefficients = cms.vdouble(0., 0.),
41 summation_params = cms.PSet(
42 siliconCellLSB_fC = cms.double(triggerCellLsbBeforeCompression_si),
43 scintillatorCellLSB_MIP = cms.double(triggerCellLsbBeforeCompression_sc),
44 noiseSilicon = cms.PSet(),
45 noiseScintillator = cms.PSet(),
48 noiseThreshold = cms.double(3),
52 compression_params_ldm = cms.PSet(
53 exponentBits = cms.uint32(4),
54 mantissaBits = cms.uint32(3),
55 truncationBits = cms.uint32(1),
56 rounding = cms.bool(
True),
59 compression_params_hdm = cms.PSet(
60 exponentBits = cms.uint32(4),
61 mantissaBits = cms.uint32(3),
62 truncationBits = cms.uint32(3),
63 rounding = cms.bool(
True),
67 fCperMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
68 fCperMIPhe = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
69 fCperMIPnose = recoparam.HGCalUncalibRecHit.HGCHFNoseConfig.fCPerMIP
70 layerWeightsNose = recocalibparam.dEdX.weightsNose
71 thicknessCorrectionSi = recocalibparam.HGCalRecHit.thicknessCorrection
72 thicknessCorrectionSc = recocalibparam.HGCalRecHit.sciThicknessCorrection
73 thicknessCorrectionNose = recocalibparam.HGCalRecHit.thicknessNoseCorrection
76 calibration_params_ee = cms.PSet(
77 lsb = cms.double(triggerCellLsbBeforeCompression_si),
78 fCperMIP = fCperMIPee,
79 dEdXweights = layercalibparam.triggerWeights.weights,
80 thicknessCorrection = cms.vdouble(thicknessCorrectionSi[0:NTHICKNESS]),
81 chargeCollectionEfficiency = cms.PSet(),
84 calibration_params_hesi = cms.PSet(
85 lsb = cms.double(triggerCellLsbBeforeCompression_si),
86 fCperMIP = fCperMIPhe,
87 dEdXweights = layercalibparam.triggerWeights.weights,
88 thicknessCorrection = cms.vdouble(thicknessCorrectionSi[NTHICKNESS:2*NTHICKNESS]),
89 chargeCollectionEfficiency = cms.PSet(),
92 calibration_params_hesc = cms.PSet(
93 lsb = cms.double(triggerCellLsbBeforeCompression_sc),
94 fCperMIP = cms.vdouble(1.),
95 dEdXweights = layercalibparam.triggerWeights.weights,
96 thicknessCorrection = cms.vdouble(thicknessCorrectionSc.value()),
97 chargeCollectionEfficiency = cms.PSet(values=cms.vdouble(1.)),
100 calibration_params_nose = cms.PSet(
101 lsb = cms.double(triggerCellLsbBeforeCompression_si),
102 fCperMIP = fCperMIPnose,
103 dEdXweights = layerWeightsNose,
104 thicknessCorrection = thicknessCorrectionNose,
105 chargeCollectionEfficiency = cms.PSet(),
108 vfe_proc = cms.PSet( ProcessorName = cms.string(
'HGCalVFEProcessorSums'),
109 linearizationCfg_si = linearization_params_si,
110 linearizationCfg_sc = linearization_params_sc,
111 summationCfg = summation_params,
112 compressionCfg_ldm = compression_params_ldm,
113 compressionCfg_hdm = compression_params_hdm,
114 calibrationCfg_ee = calibration_params_ee,
115 calibrationCfg_hesi = calibration_params_hesi,
116 calibrationCfg_hesc = calibration_params_hesc,
117 calibrationCfg_nose = calibration_params_nose,
121 from Configuration.Eras.Modifier_phase2_hgcal_cff
import phase2_hgcal
122 phase2_hgcal.toModify(summation_params,
123 noiseSilicon = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
124 noiseScintillator = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_heback")),
127 phase2_hgcal.toModify(calibration_params_ee,
128 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
130 phase2_hgcal.toModify(calibration_params_hesi,
131 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
133 phase2_hgcal.toModify(calibration_params_nose,
134 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
139 l1tHGCalVFEProducer = cms.EDProducer(
141 eeDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:EE'),
142 fhDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:HEfront'),
143 bhDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:HEback'),
144 ProcessorParameters = vfe_proc.clone()
147 l1tHFnoseVFEProducer = cms.EDProducer(
149 noseDigis = cms.InputTag(
'simHFNoseUnsuppressedDigis:HFNose'),
150 ProcessorParameters = vfe_proc.clone()