CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hgcalVFEProducer_cfi.py
Go to the documentation of this file.
1 from __future__ import absolute_import
2 import FWCore.ParameterSet.Config as cms
3 
5 
9 from . import hgcalLayersCalibrationCoefficients_cfi as layercalibparam
10 
11 
12 feCfg_si = digiparam.hgceeDigitizer.digiCfg.feCfg
13 feCfg_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg
14 
15 # trigger cell LSB before compression is the LSB of the ADC
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()))
18 
19 # Linearization parameters for silicon
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.), # OOT PU subtraction coeffs for samples (bx-2, bx-1). (0,0) = no OOT PU subtraction
29  )
30 
31 # Linearization parameters for scintillator
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.), # OOT PU subtraction coeffs for samples (bx-2, bx-1). (0,0) = no OOT PU subtraction
41  )
42 
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(),
48  # cell thresholds before TC sums
49  # Cut at 3sigma of the noise
50  noiseThreshold = cms.double(3), # in units of sigmas of the noise
51  )
52 
53 # Compression parameters for low density modules
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),
59  )
60 # Compression parameters for high density modules
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),
66  )
67 
68 # Reco calibration parameters
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
77 
78 NTHICKNESS = 3
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(),
85  )
86 
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(),
93  )
94 
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.)),
101  )
102 
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(),
109  )
110 
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,
121  )
122 
123 # isolate these refs in case they aren't available in some other WF
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")),
128 )
129 
130 phase2_hgcal.toModify(calibration_params_ee,
131  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
132 )
133 phase2_hgcal.toModify(calibration_params_hesi,
134  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
135 )
136 phase2_hgcal.toModify(calibration_params_nose,
137  chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")),
138 )
139 
140 
141 
142 hgcalVFEProducer = cms.EDProducer(
143  "HGCalVFEProducer",
144  eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'),
145  fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'),
146  bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'),
147  ProcessorParameters = vfe_proc.clone()
148  )
149 
150 hfnoseVFEProducer = cms.EDProducer(
151  "HFNoseVFEProducer",
152  noseDigis = cms.InputTag('simHFNoseUnsuppressedDigis:HFNose'),
153  ProcessorParameters = vfe_proc.clone()
154  )
155 
156 
157