CMS 3D CMS Logo

l1tHGCalVFEProducer_cfi.py
Go to the documentation of this file.
1 from __future__ import absolute_import
2 import FWCore.ParameterSet.Config as cms
3 
7 from . import hgcalLayersCalibrationCoefficients_cfi as layercalibparam
8 
9 
10 feCfg_si = digiparam.hgceeDigitizer.digiCfg.feCfg
11 feCfg_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg
12 
13 # trigger cell LSB before compression is the LSB of the ADC
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()))
16 
17 # Linearization parameters for silicon
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.), # OOT PU subtraction coeffs for samples (bx-2, bx-1). (0,0) = no OOT PU subtraction
27  )
28 
29 # Linearization parameters for scintillator
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.), # OOT PU subtraction coeffs for samples (bx-2, bx-1). (0,0) = no OOT PU subtraction
39  )
40 
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(),
46  # cell thresholds before TC sums
47  # Cut at 3sigma of the noise
48  noiseThreshold = cms.double(3), # in units of sigmas of the noise
49  )
50 
51 # Compression parameters for low density modules
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),
57  )
58 # Compression parameters for high density modules
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),
64  )
65 
66 # Reco calibration parameters
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
74 
75 NTHICKNESS = 3
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(),
82  )
83 
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(),
90  )
91 
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.)),
98  )
99 
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(),
106  )
107 
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,
118  )
119 
120 # isolate these refs in case they aren't available in some other WF
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")),
125 )
126 
127 phase2_hgcal.toModify(calibration_params_ee,
128  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
129 )
130 phase2_hgcal.toModify(calibration_params_hesi,
131  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
132 )
133 phase2_hgcal.toModify(calibration_params_nose,
134  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
135 )
136 
137 
138 
139 l1tHGCalVFEProducer = cms.EDProducer(
140  "HGCalVFEProducer",
141  eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'),
142  fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'),
143  bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'),
144  ProcessorParameters = vfe_proc.clone()
145  )
146 
147 l1tHFnoseVFEProducer = cms.EDProducer(
148  "HFNoseVFEProducer",
149  noseDigis = cms.InputTag('simHFNoseUnsuppressedDigis:HFNose'),
150  ProcessorParameters = vfe_proc.clone()
151  )
152 
153 
154