CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hgcalBackEndLayer2Producer_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 
26 dr_layerbylayer = ([0] + # no layer 0
27  [0.015]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.030]*EE_DR_GROUP + [0.040]*EE_DR_GROUP + # EM
28  [0.040]*FH_DR_GROUP + [0.050]*FH_DR_GROUP + # FH
29  [0.050]*BH_DR_GROUP) # BH
30 
31 
32 dr_layerbylayer_Bcoefficient = ([0] + # no layer 0
33  [0.020]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.02]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + # EM
34  [0.020]*FH_DR_GROUP + [0.020]*FH_DR_GROUP + # FH
35  [0.020]*BH_DR_GROUP) # BH
36 
37 
38 neighbour_weights_1stOrder = cms.vdouble(0, 0.25, 0,
39  0.25, 0, 0.25,
40  0, 0.25, 0)
41 
42 neighbour_weights_2ndOrder = cms.vdouble(-0.25, 0.5, -0.25,
43  0.5, 0, 0.5,
44  -0.25, 0.5, -0.25)
45 
46 
47 seed_smoothing_ecal = cms.vdouble(
48  1., 1., 1.,
49  1., 1.1, 1.,
50  1., 1., 1.,
51  )
52 seed_smoothing_hcal = cms.vdouble(
53  1., 1., 1., 1., 1.,
54  1., 1., 1., 1., 1.,
55  1., 1., 2., 1., 1.,
56  1., 1., 1., 1., 1.,
57  1., 1., 1., 1., 1.,
58  )
59 
60 
61 distance_C3d_params = cms.PSet(type_multicluster=cms.string('dRC3d'),
62  dR_multicluster=cms.double(0.01),
63  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
64  dist_dbscan_multicluster=cms.double(0.),
65  minN_dbscan_multicluster=cms.uint32(0),
66  EGIdentification=egamma_identification_drnn_cone.clone(),
67  )
68 
69 
70 dbscan_C3d_params = cms.PSet(type_multicluster=cms.string('DBSCANC3d'),
71  dR_multicluster=cms.double(0.),
72  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
73  dist_dbscan_multicluster=cms.double(0.005),
74  minN_dbscan_multicluster=cms.uint32(3),
75  EGIdentification=egamma_identification_drnn_dbscan.clone())
76 
77 
78 histoMax_C3d_seeding_params = cms.PSet(type_histoalgo=cms.string('HistoMaxC3d'),
79  nBins_X1_histo_multicluster=cms.uint32(42), # bin size of about 0.012
80  nBins_X2_histo_multicluster=cms.uint32(216), # bin size of about 0.029
81  binSumsHisto=binSums,
82  kROverZMin=cms.double(0.076),
83  kROverZMax=cms.double(0.58),
84  threshold_histo_multicluster=cms.double(10.),
85  neighbour_weights=neighbour_weights_1stOrder,
86  seed_position=cms.string("TCWeighted"),#BinCentre, TCWeighted
87  seeding_space=cms.string("RPhi"),# RPhi, XY
88  seed_smoothing_ecal=seed_smoothing_ecal,
89  seed_smoothing_hcal=seed_smoothing_hcal,
90  )
91 
92 histoMax_C3d_clustering_params = cms.PSet(dR_multicluster=cms.double(0.03),
93  dR_multicluster_byLayer_coefficientA=cms.vdouble(),
94  dR_multicluster_byLayer_coefficientB=cms.vdouble(),
95  shape_threshold=cms.double(1.),
96  shape_distance=cms.double(0.015),
97  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
98  cluster_association=cms.string("NearestNeighbour"),
99  EGIdentification=egamma_identification_histomax.clone(),
100  )
101 
102 
103 # >= V9 samples have a different definition of the dEdx calibrations. To account for it
104 # we rescale the thresholds of the clustering seeds
105 # (see https://indico.cern.ch/event/806845/contributions/3359859/attachments/1815187/2966402/19-03-20_EGPerf_HGCBE.pdf
106 # for more details)
107 phase2_hgcalV10.toModify(histoMax_C3d_seeding_params,
108  threshold_histo_multicluster=8.5, # MipT
109  )
110 
111 
112 histoMaxVariableDR_C3d_params = histoMax_C3d_clustering_params.clone(
113  dR_multicluster = cms.double(0.),
114  dR_multicluster_byLayer_coefficientA = cms.vdouble(dr_layerbylayer),
115  dR_multicluster_byLayer_coefficientB = cms.vdouble([0]*(MAX_LAYERS+1))
116  )
117 
118 
119 histoSecondaryMax_C3d_params = histoMax_C3d_seeding_params.clone(
120  type_histoalgo = cms.string('HistoSecondaryMaxC3d')
121  )
122 
123 histoMaxXYVariableDR_C3d_params = histoMax_C3d_seeding_params.clone(
124  seeding_space=cms.string("XY"),
125  nBins_X1_histo_multicluster=cms.uint32(192),
126  nBins_X2_histo_multicluster=cms.uint32(192)
127  )
128 
129 histoInterpolatedMax_C3d_params = histoMax_C3d_seeding_params.clone(
130  type_histoalgo = cms.string('HistoInterpolatedMaxC3d')
131  )
132 
133 
134 histoThreshold_C3d_params = histoMax_C3d_seeding_params.clone(
135  type_histoalgo = cms.string('HistoThresholdC3d')
136  )
137 
138 
139 histoMax_C3d_params = cms.PSet(
140  type_multicluster=cms.string('Histo'),
141  histoMax_C3d_clustering_parameters = histoMaxVariableDR_C3d_params.clone(),
142  histoMax_C3d_seeding_parameters = histoMax_C3d_seeding_params.clone(),
143  )
144 
145 
146 energy_interpretations_em = cms.PSet(type = cms.string('HGCalTriggerClusterInterpretationEM'),
147  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),
148  scale_correction_coeff = cms.vdouble(53.94, -27.15),
149  dr_bylayer = cms.vdouble([0.015]*15)
150  )
151 
152 phase2_hgcalV10.toModify(
153  energy_interpretations_em,
154  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),
155  scale_correction_coeff=cms.vdouble(53.92, -27.53),
156  )
157 
158 phase2_hgcalV11.toModify(
159  energy_interpretations_em,
160  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),
161  scale_correction_coeff=cms.vdouble(52.99, -24.96),
162  )
163 
164 
165 energy_interpretations = cms.VPSet(energy_interpretations_em)
166 
167 be_proc = cms.PSet(ProcessorName = cms.string('HGCalBackendLayer2Processor3DClustering'),
168  C3d_parameters = histoMax_C3d_params.clone(),
169  energy_interpretations = energy_interpretations
170  )
171 
172 hgcalBackEndLayer2Producer = cms.EDProducer(
173  "HGCalBackendLayer2Producer",
174  InputCluster = cms.InputTag('hgcalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering'),
175  ProcessorParameters = be_proc.clone()
176  )
177 
178 
179 hgcalBackEndLayer2ProducerHFNose = hgcalBackEndLayer2Producer.clone(
180  InputCluster = cms.InputTag('hgcalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering'),
181  ProcessorParameters = dict(
182  C3d_parameters = dict(
183  histoMax_C3d_seeding_parameters = dict(
184  ## note in #Phi same bin size for HGCAL and HFNose
185  nBins_X1_histo_multicluster = 4, # R bin size: 5 FullModules * 8 TP
186  binSumsHisto = cms.vuint32(13,11,9,9),
187  kROverZMin = 0.025,
188  kROverZMax = 0.1
189  )
190  )
191  )
192 )