CMS 3D CMS Logo

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 # Silicon Digitization parameters
12 adcSaturation_si = digiparam.hgceeDigitizer.digiCfg.feCfg.adcSaturation_fC
13 adcNbits_si = digiparam.hgceeDigitizer.digiCfg.feCfg.adcNbits
14 tdcSaturation_si = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcSaturation_fC
15 tdcNbits_si = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcNbits
16 tdcOnset_si = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcOnset_fC
17 # Scintillator Digitization parameters
18 adcSaturation_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
19 adcNbits_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
20 tdcSaturation_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg.tdcSaturation_fC
21 tdcNbits_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg.tdcNbits
22 tdcOnset_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg.tdcOnset_fC
23 
24 # Reco calibration parameters
25 fCPerMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
26 fCPerMIPfh = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
27 layerWeights = layercalibparam.TrgLayer_dEdX_weights
28 thicknessCorrection = recocalibparam.HGCalRecHit.thicknessCorrection
29 
30 # Equalization in the frontend of the sensor responses to 200um sensors
31 frontend_thickness_corrections = [1./(c1*c2) for c1,c2 in zip(fCPerMIPee,thicknessCorrection)]
32 c200 = frontend_thickness_corrections[1]
33 frontend_thickness_corrections = [c/c200 for c in frontend_thickness_corrections]
34 fCPerMIP_200 = fCPerMIPee[1]
35 thicknessCorrection_200 = thicknessCorrection[1]
36 
37 # Parameters used in several places
38 triggerCellLsbBeforeCompression = 100./1024.
39 triggerCellTruncationBits = 0
40 
41 vfe_proc = cms.PSet( ProcessorName = cms.string('HGCalVFEProcessorSums'),
42  # Silicon digi parameters
43  linLSB_si = cms.double(triggerCellLsbBeforeCompression),
44  adcsaturation_si = adcSaturation_si,
45  tdcnBits_si = tdcNbits_si,
46  tdcOnset_si = tdcOnset_si,
47  adcnBits_si = adcNbits_si,
48  tdcsaturation_si = tdcSaturation_si,
49  # Scintillator digi parameters
50  linLSB_sc = cms.double(float(adcSaturation_sc.value())/(2**float(adcNbits_sc.value()))),
51  adcsaturation_sc = adcSaturation_sc,
52  tdcnBits_sc = tdcNbits_sc,
53  tdcOnset_sc = tdcOnset_sc,
54  adcnBits_sc = adcNbits_sc,
55  tdcsaturation_sc = tdcSaturation_sc,
56  linnBits = cms.uint32(16),
57  siliconCellLSB_fC = cms.double( triggerCellLsbBeforeCompression*(2**triggerCellTruncationBits) ),
58  scintillatorCellLSB_MIP = cms.double(float(adcSaturation_sc.value())/(2**float(adcNbits_sc.value()))),
59  noiseSilicon = cms.PSet(),
60  noiseScintillator = cms.PSet(),
61  # cell thresholds before TC sums
62  # Cut at 3sigma of the noise
63  noiseThreshold = cms.double(3), # in units of sigmas of the noise
64  # Floating point compression
65  exponentBits = cms.uint32(4),
66  mantissaBits = cms.uint32(4),
67  rounding = cms.bool(True),
68  # Trigger cell calibration
69  fCperMIP = cms.double(fCPerMIP_200),
70  dEdXweights = layerWeights,
71  ThicknessCorrections = cms.vdouble(frontend_thickness_corrections),
72  thickCorr = cms.double(thicknessCorrection_200)
73  )
74 
75 # isolate these refs in case they aren't available in some other WF
76 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
77 phase2_hgcal.toModify(vfe_proc,
78  noiseSilicon = cms.PSet(refToPSet_ = cms.string("HGCAL_noise_fC")),
79  noiseScintillator = cms.PSet(refToPSet_ = cms.string("HGCAL_noise_heback")),
80 )
81 
82 hgcalVFEProducer = cms.EDProducer(
83  "HGCalVFEProducer",
84  eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'),
85  fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'),
86  bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'),
87  ProcessorParameters = vfe_proc.clone()
88  )
89 
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)