1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
9 from .
import hgcalLayersCalibrationCoefficients_cfi
as layercalibparam
12 feCfg_si = digiparam.hgceeDigitizer.digiCfg.feCfg
13 feCfg_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg
16 triggerCellLsbBeforeCompression_si = float(feCfg_si.adcSaturation_fC.value())/(2**float(feCfg_si.adcNbits.value()))
17 triggerCellLsbBeforeCompression_sc = float(feCfg_sc.adcSaturation_fC.value())/(2**float(feCfg_sc.adcNbits.value()))
20 linearization_params_si = cms.PSet(
21 linLSB = cms.double(triggerCellLsbBeforeCompression_si),
22 adcsaturation = feCfg_si.adcSaturation_fC,
23 tdcnBits = feCfg_si.tdcNbits,
24 tdcOnset = feCfg_si.tdcOnset_fC,
25 adcnBits = feCfg_si.adcNbits,
26 tdcsaturation = feCfg_si.tdcSaturation_fC,
27 linnBits = cms.uint32(17),
28 oot_coefficients = cms.vdouble(0., 0.),
32 linearization_params_sc = cms.PSet(
33 linLSB = cms.double(triggerCellLsbBeforeCompression_sc),
34 adcsaturation = feCfg_sc.adcSaturation_fC,
35 tdcnBits = feCfg_sc.tdcNbits,
36 tdcOnset = feCfg_sc.tdcOnset_fC,
37 adcnBits = feCfg_sc.adcNbits,
38 tdcsaturation = feCfg_sc.tdcSaturation_fC,
39 linnBits = cms.uint32(17),
40 oot_coefficients = cms.vdouble(0., 0.),
43 summation_params = cms.PSet(
44 siliconCellLSB_fC = cms.double(triggerCellLsbBeforeCompression_si),
45 scintillatorCellLSB_MIP = cms.double(triggerCellLsbBeforeCompression_sc),
46 noiseSilicon = cms.PSet(),
47 noiseScintillator = cms.PSet(),
50 noiseThreshold = cms.double(3),
54 compression_params_ldm = cms.PSet(
55 exponentBits = cms.uint32(4),
56 mantissaBits = cms.uint32(3),
57 truncationBits = cms.uint32(1),
58 rounding = cms.bool(
True),
61 compression_params_hdm = cms.PSet(
62 exponentBits = cms.uint32(4),
63 mantissaBits = cms.uint32(3),
64 truncationBits = cms.uint32(3),
65 rounding = cms.bool(
True),
69 fCperMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
70 fCperMIPhe = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
71 fCperMIPnose = recoparam.HGCalUncalibRecHit.HGCHFNoseConfig.fCPerMIP
72 layerWeights = layercalibparam.TrgLayer_dEdX_weights
73 layerWeightsNose = recocalibparam.dEdX.weightsNose
74 thicknessCorrectionSi = recocalibparam.HGCalRecHit.thicknessCorrection
75 thicknessCorrectionSc = recocalibparam.HGCalRecHit.sciThicknessCorrection
76 thicknessCorrectionNose = recocalibparam.HGCalRecHit.thicknessNoseCorrection
79 calibration_params_ee = cms.PSet(
80 lsb = cms.double(triggerCellLsbBeforeCompression_si),
81 fCperMIP = fCperMIPee,
82 dEdXweights = layerWeights,
83 thicknessCorrection = cms.vdouble(thicknessCorrectionSi[0:NTHICKNESS]),
84 chargeCollectionEfficiency = cms.PSet(),
87 calibration_params_hesi = cms.PSet(
88 lsb = cms.double(triggerCellLsbBeforeCompression_si),
89 fCperMIP = fCperMIPhe,
90 dEdXweights = layerWeights,
91 thicknessCorrection = cms.vdouble(thicknessCorrectionSi[NTHICKNESS:2*NTHICKNESS]),
92 chargeCollectionEfficiency = cms.PSet(),
95 calibration_params_hesc = cms.PSet(
96 lsb = cms.double(triggerCellLsbBeforeCompression_sc),
97 fCperMIP = cms.vdouble(1.),
98 dEdXweights = layerWeights,
99 thicknessCorrection = cms.vdouble(thicknessCorrectionSc.value()),
100 chargeCollectionEfficiency = cms.PSet(values=cms.vdouble(1.)),
103 calibration_params_nose = cms.PSet(
104 lsb = cms.double(triggerCellLsbBeforeCompression_si),
105 fCperMIP = fCperMIPnose,
106 dEdXweights = layerWeightsNose,
107 thicknessCorrection = thicknessCorrectionNose,
108 chargeCollectionEfficiency = cms.PSet(),
111 vfe_proc = cms.PSet( ProcessorName = cms.string(
'HGCalVFEProcessorSums'),
112 linearizationCfg_si = linearization_params_si,
113 linearizationCfg_sc = linearization_params_sc,
114 summationCfg = summation_params,
115 compressionCfg_ldm = compression_params_ldm,
116 compressionCfg_hdm = compression_params_hdm,
117 calibrationCfg_ee = calibration_params_ee,
118 calibrationCfg_hesi = calibration_params_hesi,
119 calibrationCfg_hesc = calibration_params_hesc,
120 calibrationCfg_nose = calibration_params_nose,
124 from Configuration.Eras.Modifier_phase2_hgcal_cff
import phase2_hgcal
125 phase2_hgcal.toModify(summation_params,
126 noiseSilicon = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
127 noiseScintillator = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_heback")),
130 phase2_hgcal.toModify(calibration_params_ee,
131 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
133 phase2_hgcal.toModify(calibration_params_hesi,
134 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
136 phase2_hgcal.toModify(calibration_params_nose,
137 chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
142 hgcalVFEProducer = cms.EDProducer(
144 eeDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:EE'),
145 fhDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:HEfront'),
146 bhDigis = cms.InputTag(
'simHGCalUnsuppressedDigis:HEback'),
147 ProcessorParameters = vfe_proc.clone()
150 hfnoseVFEProducer = cms.EDProducer(
152 noseDigis = cms.InputTag(
'simHFNoseUnsuppressedDigis:HFNose'),
153 ProcessorParameters = vfe_proc.clone()