CMS 3D CMS Logo

hgcalTriggerPrimitiveDigiProducer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
5 import hgcalLayersCalibrationCoefficients_cfi as layercalibparam
6 
7 # Digitization parameters
8 adcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.adcSaturation_fC
9 adcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.adcNbits
10 tdcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcSaturation_fC
11 tdcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcNbits
12 tdcOnset_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcOnset_fC
13 adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
14 adcNbitsBH = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
15 # Reco calibration parameters
16 fCPerMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
17 fCPerMIPfh = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
18 layerWeights = layercalibparam.TrgLayer_dEdX_weights
19 thicknessCorrection = recocalibparam.HGCalRecHit.thicknessCorrection
20 
21 # Parameters used in several places
22 triggerCellLsbBeforeCompression = 100./1024.
23 triggerCellTruncationBits = 0
24 
25 # Equalization in the frontend of the sensor responses to 200um sensors
26 frontend_thickness_corrections = [1./(c1*c2) for c1,c2 in zip(fCPerMIPee,thicknessCorrection)]
27 c200 = frontend_thickness_corrections[1]
28 frontend_thickness_corrections = [c/c200 for c in frontend_thickness_corrections]
29 fCPerMIP_200 = fCPerMIPee[1]
30 thicknessCorrection_200 = thicknessCorrection[1]
31 
32 fe_codec = cms.PSet( CodecName = cms.string('HGCalTriggerCellThresholdCodec'),
33  CodecIndex = cms.uint32(2),
34  MaxCellsInModule = cms.uint32(288),
35  DataLength = cms.uint32(20),
36  linLSB = cms.double(triggerCellLsbBeforeCompression),
37  linnBits = cms.uint32(16),
38  triggerCellTruncationBits = cms.uint32(triggerCellTruncationBits),
39  NData = cms.uint32(999),
40  TCThreshold_fC = cms.double(0.),
41  TCThresholdBH_MIP = cms.double(0.),
42  #take the following parameters from the digitization config file
43  adcsaturation = adcSaturation_fC,
44  adcnBits = adcNbits,
45  tdcsaturation = tdcSaturation_fC,
46  tdcnBits = tdcNbits,
47  tdcOnsetfC = tdcOnset_fC,
48  adcsaturationBH = adcSaturationBH_MIP,
49  adcnBitsBH = adcNbitsBH,
50  ThicknessCorrections = cms.vdouble(frontend_thickness_corrections)
51  )
52 
53 calib_parValues = cms.PSet( siliconCellLSB_fC = cms.double( triggerCellLsbBeforeCompression*(2**triggerCellTruncationBits) ),
54  scintillatorCellLSB_MIP = cms.double(float(adcSaturationBH_MIP.value())/(2**float(adcNbitsBH.value()))),
55  fCperMIP = cms.double(fCPerMIP_200),
56  dEdXweights = layerWeights,
57  thickCorr = cms.double(thicknessCorrection_200)
58  )
59 
60 C2d_parValues = cms.PSet( seeding_threshold_silicon = cms.double(5), # MipT
61  seeding_threshold_scintillator = cms.double(5), # MipT
62  clustering_threshold_silicon = cms.double(2), # MipT
63  clustering_threshold_scintillator = cms.double(2), # MipT
64  dR_cluster=cms.double(6.),
65  clusterType = cms.string('dRNNC2d'),
66  applyLayerCalibration = cms.bool(True),
67  layerWeights = layercalibparam.TrgLayer_weights,
68  # Parameters not used by this clustering
69  calibSF_cluster=cms.double(0.)
70  )
71 
72 C3d_parValues = cms.PSet( dR_multicluster = cms.double(0.01), # dR in normalized plane used to clusterize C2d
73  minPt_multicluster = cms.double(0.5), # minimum pt of the multicluster (GeV)
74  type_multicluster = cms.string('dRC3d'),
75  # Parameters not used by this clustering
76  dist_dbscan_multicluster=cms.double(0.),
77  minN_dbscan_multicluster=cms.uint32(0)
78 )
79 
80 cluster_algo = cms.PSet( AlgorithmName = cms.string('HGCClusterAlgoThreshold'),
81  FECodec = fe_codec.clone(),
82  calib_parameters = calib_parValues.clone(),
83  triggercell_threshold_silicon = cms.double(2.), # MipT
84  triggercell_threshold_scintillator = cms.double(2.), # MipT
85  C2d_parameters = C2d_parValues.clone(),
86  C3d_parameters = C3d_parValues.clone()
87  )
88 
89 towerMap2D_parValues = cms.PSet( nEtaBins = cms.int32(18),
90  nPhiBins = cms.int32(72),
91  etaBins = cms.vdouble(),
92  phiBins = cms.vdouble(),
93  useLayerWeights = cms.bool(False),
94  layerWeights = cms.vdouble()
95  )
96 
97 tower_algo = cms.PSet( AlgorithmName = cms.string('HGCTowerAlgoThreshold'),
98  FECodec = fe_codec.clone(),
99  calib_parameters = calib_parValues.clone(),
100  towermap_parameters = towerMap2D_parValues.clone()
101  )
102 
103 hgcalTriggerPrimitiveDigiProducer = cms.EDProducer(
104  "HGCalTriggerDigiProducer",
105  eeDigis = cms.InputTag('mix:HGCDigisEE'),
106  fhDigis = cms.InputTag('mix:HGCDigisHEfront'),
107  bhDigis = cms.InputTag('mix:HGCDigisHEback'),
108  FECodec = fe_codec.clone(),
109  BEConfiguration = cms.PSet(
110  algorithms = cms.VPSet( cluster_algo,
111  tower_algo )
112  )
113  )
114 
115 hgcalTriggerPrimitiveDigiFEReproducer = cms.EDProducer(
116  "HGCalTriggerDigiFEReproducer",
117  feDigis = cms.InputTag('hgcalTriggerPrimitiveDigiProducer'),
118  FECodec = fe_codec.clone(),
119  BEConfiguration = cms.PSet(
120  algorithms = cms.VPSet( cluster_algo,
121  tower_algo)
122  )
123  )
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)