CMS 3D CMS Logo

l1tHGCalBackEndLayer2Producer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from L1Trigger.L1THGCal.egammaIdentification import egamma_identification_drnn_cone, \
4  egamma_identification_drnn_dbscan, \
5  egamma_identification_histomax
6 
7 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
8 from Configuration.Eras.Modifier_phase2_hgcalV11_cff import phase2_hgcalV11
9 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
10 
11 
12 binSums = cms.vuint32(13, # 0
13  11, 11, 11, # 1 - 3
14  9, 9, 9, # 4 - 6
15  7, 7, 7, 7, 7, 7, # 7 - 12
16  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, # 13 - 27
17  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 # 28 - 41
18  )
19 
20 EE_DR_GROUP = 7
21 FH_DR_GROUP = 6
22 BH_DR_GROUP = 12
23 MAX_LAYERS = 52
24 
25 dr_layerbylayer = ([0] + # no layer 0
26  [0.015]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.030]*EE_DR_GROUP + [0.040]*EE_DR_GROUP + # EM
27  [0.040]*FH_DR_GROUP + [0.050]*FH_DR_GROUP + # FH
28  [0.050]*BH_DR_GROUP) # BH
29 
30 
31 dr_layerbylayer_Bcoefficient = ([0] + # no layer 0
32  [0.020]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.02]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + # EM
33  [0.020]*FH_DR_GROUP + [0.020]*FH_DR_GROUP + # FH
34  [0.020]*BH_DR_GROUP) # BH
35 
36 
37 neighbour_weights_1stOrder = cms.vdouble(0, 0.25, 0,
38  0.25, 0, 0.25,
39  0, 0.25, 0)
40 
41 neighbour_weights_2ndOrder = cms.vdouble(-0.25, 0.5, -0.25,
42  0.5, 0, 0.5,
43  -0.25, 0.5, -0.25)
44 
45 
46 seed_smoothing_ecal = cms.vdouble(
47  1., 1., 1.,
48  1., 1.1, 1.,
49  1., 1., 1.,
50  )
51 seed_smoothing_hcal = cms.vdouble(
52  1., 1., 1., 1., 1.,
53  1., 1., 1., 1., 1.,
54  1., 1., 2., 1., 1.,
55  1., 1., 1., 1., 1.,
56  1., 1., 1., 1., 1.,
57  )
58 
59 distance_C3d_params = cms.PSet(type_multicluster=cms.string('dRC3d'),
60  dR_multicluster=cms.double(0.01),
61  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
62  dist_dbscan_multicluster=cms.double(0.),
63  minN_dbscan_multicluster=cms.uint32(0),
64  EGIdentification=egamma_identification_drnn_cone.clone(),
65  )
66 
67 
68 dbscan_C3d_params = cms.PSet(type_multicluster=cms.string('DBSCANC3d'),
69  dR_multicluster=cms.double(0.),
70  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
71  dist_dbscan_multicluster=cms.double(0.005),
72  minN_dbscan_multicluster=cms.uint32(3),
73  EGIdentification=egamma_identification_drnn_dbscan.clone())
74 
75 
76 histoMax_C3d_seeding_params = cms.PSet(type_histoalgo=cms.string('HistoMaxC3d'),
77  nBins_X1_histo_multicluster=cms.uint32(42), # bin size of about 0.012
78  nBins_X2_histo_multicluster=cms.uint32(216), # bin size of about 0.029
79  binSumsHisto=binSums,
80  kROverZMin=cms.double(0.076),
81  kROverZMax=cms.double(0.58),
82  threshold_histo_multicluster=cms.double(20.),
83  neighbour_weights=neighbour_weights_1stOrder,
84  seed_position=cms.string("TCWeighted"),#BinCentre, TCWeighted
85  seeding_space=cms.string("RPhi"),# RPhi, XY
86  seed_smoothing_ecal=seed_smoothing_ecal,
87  seed_smoothing_hcal=seed_smoothing_hcal,
88  seeds_norm_by_area=cms.bool(False)
89  )
90 
91 histoMax_C3d_clustering_params = cms.PSet(dR_multicluster=cms.double(0.03),
92  dR_multicluster_byLayer_coefficientA=cms.vdouble(),
93  dR_multicluster_byLayer_coefficientB=cms.vdouble(),
94  shape_threshold=cms.double(1.),
95  shape_distance=cms.double(0.015),
96  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
97  cluster_association=cms.string("NearestNeighbour"),
98  EGIdentification=egamma_identification_histomax.clone(),
99  )
100 
101 
102 histoMax_C3d_sorting_truncation_params = cms.PSet(AlgoName = cms.string('HGCalSortingTruncationWrapper'),
103  maxTCs=cms.uint32(80),
104  )
105 
106 
107 histoMaxVariableDR_C3d_params = histoMax_C3d_clustering_params.clone(
108  AlgoName = cms.string('HGCalHistoClusteringWrapper'),
109  dR_multicluster = cms.double(0.),
110  dR_multicluster_byLayer_coefficientA = cms.vdouble(dr_layerbylayer),
111  dR_multicluster_byLayer_coefficientB = cms.vdouble([0]*(MAX_LAYERS+1))
112  )
113 
114 
115 histoSecondaryMax_C3d_params = histoMax_C3d_seeding_params.clone(
116  type_histoalgo = cms.string('HistoSecondaryMaxC3d')
117  )
118 
119 histoMaxXYVariableDR_C3d_params = histoMax_C3d_seeding_params.clone(
120  seeding_space=cms.string("XY"),
121  nBins_X1_histo_multicluster=cms.uint32(192),
122  nBins_X2_histo_multicluster=cms.uint32(192)
123  )
124 
125 histoInterpolatedMax_C3d_params = histoMax_C3d_seeding_params.clone(
126  type_histoalgo = cms.string('HistoInterpolatedMaxC3d')
127  )
128 
129 
130 histoThreshold_C3d_params = histoMax_C3d_seeding_params.clone(
131  type_histoalgo = cms.string('HistoThresholdC3d')
132  )
133 
134 
135 histoMax_C3d_params = cms.PSet(
136  type_multicluster=cms.string('Histo'),
137  histoMax_C3d_clustering_parameters = histoMaxVariableDR_C3d_params.clone(),
138  histoMax_C3d_seeding_parameters = histoMax_C3d_seeding_params.clone(),
139  histoMax_C3d_sorting_truncation_parameters = histoMax_C3d_sorting_truncation_params.clone(),
140  )
141 
142 
143 energy_interpretations_em = cms.PSet(type = cms.string('HGCalTriggerClusterInterpretationEM'),
144  layer_containment_corrs = cms.vdouble(0., 0.0, 1.38, 0.97, 1.11, 0.92, 1.06, 1.01, 1.06, 0.89, 1.0, 1.06, 0.89, 1.62, 1.83),
145  scale_correction_coeff = cms.vdouble(53.94, -27.15),
146  dr_bylayer = cms.vdouble([0.015]*15)
147  )
148 
149 phase2_hgcalV10.toModify(
150  energy_interpretations_em,
151  layer_containment_corrs=cms.vdouble(0., 0.0, 1.73, 0.97, 1.08, 1.1, 1.01, 0.96, 1.18, 0.98, 1.05, 0.99, 0.89, 1.75, 2.0),
152  scale_correction_coeff=cms.vdouble(53.92, -27.53),
153  )
154 
155 phase2_hgcalV11.toModify(
156  energy_interpretations_em,
157  layer_containment_corrs=cms.vdouble(0., 0.0, 1.28, 1.09, 1.0, 1.07, 1.09, 1.04, 1.0, 1.09, 1.07, 1.03, 0.93, 1.4, 1.89),
158  scale_correction_coeff=cms.vdouble(52.99, -24.96),
159  )
160 
161 
162 energy_interpretations = cms.VPSet(energy_interpretations_em)
163 
164 be_proc = cms.PSet(ProcessorName = cms.string('HGCalBackendLayer2Processor3DClustering'),
165  C3d_parameters = histoMax_C3d_params.clone(),
166  energy_interpretations = energy_interpretations
167  )
168 
169 l1tHGCalBackEndLayer2Producer = cms.EDProducer(
170  "HGCalBackendLayer2Producer",
171  InputCluster = cms.InputTag('l1tHGCalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering'),
172  ProcessorParameters = be_proc.clone()
173  )
174 
175 l1tHGCalBackEndStage2Producer = cms.EDProducer(
176  "HGCalBackendLayer2Producer",
177  InputCluster = cms.InputTag('l1tHGCalBackEndStage1Producer:HGCalBackendStage1Processor'),
178  ProcessorParameters = be_proc.clone()
179  )
180 
181 l1tHGCalBackEndLayer2ProducerHFNose = l1tHGCalBackEndLayer2Producer.clone(
182  InputCluster = cms.InputTag('l1tHGCalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering'),
183  ProcessorParameters = dict(
184  C3d_parameters = dict(
185  histoMax_C3d_seeding_parameters = dict(
186 
187  nBins_X1_histo_multicluster = 4, # R bin size: 5 FullModules * 8 TP
188  binSumsHisto = cms.vuint32(13,11,9,9),
189  kROverZMin = 0.025,
190  kROverZMax = 0.1
191  )
192  )
193  )
194 )