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 import math
7 
8 # Digitization parameters
9 adcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.adcSaturation_fC
10 adcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.adcNbits
11 tdcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcSaturation_fC
12 tdcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcNbits
13 tdcOnset_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcOnset_fC
14 adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
15 adcNbitsBH = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
16 # Reco calibration parameters
17 fCPerMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
18 fCPerMIPfh = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
19 layerWeights = layercalibparam.TrgLayer_dEdX_weights
20 thicknessCorrection = recocalibparam.HGCalRecHit.thicknessCorrection
21 
22 # Parameters used in several places
23 triggerCellLsbBeforeCompression = 100./1024.
24 triggerCellTruncationBits = 0
25 
26 # Equalization in the frontend of the sensor responses to 200um sensors
27 frontend_thickness_corrections = [1./(c1*c2) for c1,c2 in zip(fCPerMIPee,thicknessCorrection)]
28 c200 = frontend_thickness_corrections[1]
29 frontend_thickness_corrections = [c/c200 for c in frontend_thickness_corrections]
30 fCPerMIP_200 = fCPerMIPee[1]
31 thicknessCorrection_200 = thicknessCorrection[1]
32 
33 fe_codec = cms.PSet( CodecName = cms.string('HGCalTriggerCellThresholdCodec'),
34  CodecIndex = cms.uint32(2),
35  MaxCellsInModule = cms.uint32(288),
36  DataLength = cms.uint32(20),
37  linLSB = cms.double(triggerCellLsbBeforeCompression),
38  linnBits = cms.uint32(16),
39  triggerCellTruncationBits = cms.uint32(triggerCellTruncationBits),
40  NData = cms.uint32(999),
41  TCThreshold_fC = cms.double(0.),
42  TCThresholdBH_MIP = cms.double(0.),
43  #take the following parameters from the digitization config file
44  adcsaturation = adcSaturation_fC,
45  adcnBits = adcNbits,
46  tdcsaturation = tdcSaturation_fC,
47  tdcnBits = tdcNbits,
48  tdcOnsetfC = tdcOnset_fC,
49  adcsaturationBH = adcSaturationBH_MIP,
50  adcnBitsBH = adcNbitsBH,
51  ThicknessCorrections = cms.vdouble(frontend_thickness_corrections)
52  )
53 
54 calib_parValues = cms.PSet( siliconCellLSB_fC = cms.double( triggerCellLsbBeforeCompression*(2**triggerCellTruncationBits) ),
55  scintillatorCellLSB_MIP = cms.double(float(adcSaturationBH_MIP.value())/(2**float(adcNbitsBH.value()))),
56  fCperMIP = cms.double(fCPerMIP_200),
57  dEdXweights = layerWeights,
58  thickCorr = cms.double(thicknessCorrection_200)
59  )
60 
61 C2d_parValues = cms.PSet( seeding_threshold_silicon = cms.double(5), # MipT
62  seeding_threshold_scintillator = cms.double(5), # MipT
63  clustering_threshold_silicon = cms.double(2), # MipT
64  clustering_threshold_scintillator = cms.double(2), # MipT
65  dR_cluster=cms.double(6.),
66  clusterType = cms.string('dRNNC2d'),
67  applyLayerCalibration = cms.bool(True),
68  layerWeights = layercalibparam.TrgLayer_weights,
69  # Parameters not used by this clustering
70  calibSF_cluster=cms.double(0.)
71  )
72 
73 
74 from L1Trigger.L1THGCal.egammaIdentification import egamma_identification_drnn_cone
75 C3d_parValues = cms.PSet( dR_multicluster = cms.double(0.01), # dR in normalized plane used to clusterize C2d
76  minPt_multicluster = cms.double(0.5), # minimum pt of the multicluster (GeV)
77  type_multicluster = cms.string('dRC3d'),
78  # Parameters not used by this clustering
79  dist_dbscan_multicluster=cms.double(0.),
80  minN_dbscan_multicluster=cms.uint32(0),
81  EGIdentification=egamma_identification_drnn_cone.clone()
82 )
83 
84 
85 
86 cluster_algo = cms.PSet( AlgorithmName = cms.string('HGCClusterAlgoThreshold'),
87  FECodec = fe_codec.clone(),
88  calib_parameters = calib_parValues.clone(),
89  triggercell_threshold_silicon = cms.double(2.), # MipT
90  triggercell_threshold_scintillator = cms.double(2.), # MipT
91  C2d_parameters = C2d_parValues.clone(),
92  C3d_parameters = C3d_parValues.clone()
93  )
94 
95 L1TTriggerTowerConfig_etaphi = cms.PSet(readMappingFile=cms.bool(False),
96  minEta=cms.double(1.479),
97  maxEta=cms.double(3.0),
98  minPhi=cms.double(-1*math.pi),
99  maxPhi=cms.double(math.pi),
100  nBinsEta=cms.int32(18),
101  nBinsPhi=cms.int32(72),
102  binsEta=cms.vdouble(),
103  binsPhi=cms.vdouble())
104 
105 
106 L1TTriggerTowerConfig_hgcroc_etaphi = cms.PSet(readMappingFile=cms.bool(True),
107  L1TTriggerTowerMapping=cms.FileInPath("L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v0.txt"),
108  minEta=cms.double(1.41),
109  maxEta=cms.double(3.1),
110  minPhi=cms.double(-1*math.pi),
111  maxPhi=cms.double(math.pi),
112  nBinsEta=cms.int32(18),
113  nBinsPhi=cms.int32(72),
114  binsEta=cms.vdouble(),
115  binsPhi=cms.vdouble())
116 
117 
118 
119 towerMap2D_parValues = cms.PSet( useLayerWeights = cms.bool(False),
120  layerWeights = cms.vdouble(),
121  L1TTriggerTowerConfig = L1TTriggerTowerConfig_etaphi
122  )
123 
124 
125 
126 
127 tower_algo = cms.PSet( AlgorithmName = cms.string('HGCTowerAlgoThreshold'),
128  FECodec = fe_codec.clone(),
129  calib_parameters = calib_parValues.clone(),
130  towermap_parameters = towerMap2D_parValues.clone()
131  )
132 
133 hgcalTriggerPrimitiveDigiProducer = cms.EDProducer(
134  "HGCalTriggerDigiProducer",
135  eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'),
136  fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'),
137  bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'),
138  FECodec = fe_codec.clone(),
139  BEConfiguration = cms.PSet(
140  algorithms = cms.VPSet( cluster_algo,
141  tower_algo )
142  )
143  )
144 
145 hgcalTriggerPrimitiveDigiFEReproducer = cms.EDProducer(
146  "HGCalTriggerDigiFEReproducer",
147  feDigis = cms.InputTag('hgcalTriggerPrimitiveDigiProducer'),
148  FECodec = fe_codec.clone(),
149  BEConfiguration = cms.PSet(
150  algorithms = cms.VPSet( cluster_algo,
151  tower_algo)
152  )
153  )
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)