CMS 3D CMS Logo

hgcalBackEndLayer2Producer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
6 
7 from L1Trigger.L1THGCal.egammaIdentification import egamma_identification_drnn_cone, \
8  egamma_identification_drnn_dbscan, \
9  egamma_identification_histomax
10 
11 from Configuration.Eras.Modifier_phase2_hgcalV9_cff import phase2_hgcalV9
12 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
13 
14 
15 binSums = cms.vuint32(13, # 0
16  11, 11, 11, # 1 - 3
17  9, 9, 9, # 4 - 6
18  7, 7, 7, 7, 7, 7, # 7 - 12
19  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, # 13 - 27
20  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 # 28 - 41
21  )
22 
23 EE_DR_GROUP = 7
24 FH_DR_GROUP = 6
25 BH_DR_GROUP = 12
26 MAX_LAYERS = 52
27 
28 
29 dr_layerbylayer = ([0] + # no layer 0
30  [0.015]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.030]*EE_DR_GROUP + [0.040]*EE_DR_GROUP + # EM
31  [0.040]*FH_DR_GROUP + [0.050]*FH_DR_GROUP + # FH
32  [0.050]*BH_DR_GROUP) # BH
33 
34 
35 dr_layerbylayer_Bcoefficient = ([0] + # no layer 0
36  [0.020]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.02]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + # EM
37  [0.020]*FH_DR_GROUP + [0.020]*FH_DR_GROUP + # FH
38  [0.020]*BH_DR_GROUP) # BH
39 
40 
41 neighbour_weights_1stOrder = cms.vdouble(0, 0.25, 0,
42  0.25, 0, 0.25,
43  0, 0.25, 0)
44 
45 neighbour_weights_2ndOrder = cms.vdouble(-0.25, 0.5, -0.25,
46  0.5, 0, 0.5,
47  -0.25, 0.5, -0.25)
48 
49 
50 seed_smoothing_ecal = cms.vdouble(
51  1., 1., 1.,
52  1., 1.1, 1.,
53  1., 1., 1.,
54  )
55 seed_smoothing_hcal = cms.vdouble(
56  1., 1., 1., 1., 1.,
57  1., 1., 1., 1., 1.,
58  1., 1., 2., 1., 1.,
59  1., 1., 1., 1., 1.,
60  1., 1., 1., 1., 1.,
61  )
62 
63 
64 distance_C3d_params = cms.PSet(type_multicluster=cms.string('dRC3d'),
65  dR_multicluster=cms.double(0.01),
66  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
67  dist_dbscan_multicluster=cms.double(0.),
68  minN_dbscan_multicluster=cms.uint32(0),
69  EGIdentification=egamma_identification_drnn_cone.clone(),
70  )
71 
72 
73 dbscan_C3d_params = cms.PSet(type_multicluster=cms.string('DBSCANC3d'),
74  dR_multicluster=cms.double(0.),
75  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
76  dist_dbscan_multicluster=cms.double(0.005),
77  minN_dbscan_multicluster=cms.uint32(3),
78  EGIdentification=egamma_identification_drnn_dbscan.clone())
79 
80 
81 histoMax_C3d_seeding_params = cms.PSet(type_histoalgo=cms.string('HistoMaxC3d'),
82  nBins_X1_histo_multicluster=cms.uint32(42), # bin size of about 0.012
83  nBins_X2_histo_multicluster=cms.uint32(216), # bin size of about 0.029
84  binSumsHisto=binSums,
85  threshold_histo_multicluster=cms.double(10.),
86  neighbour_weights=neighbour_weights_1stOrder,
87  seed_position=cms.string("TCWeighted"),#BinCentre, TCWeighted
88  seeding_space=cms.string("RPhi"),# RPhi, XY
89  seed_smoothing_ecal=seed_smoothing_ecal,
90  seed_smoothing_hcal=seed_smoothing_hcal,
91  )
92 
93 histoMax_C3d_clustering_params = cms.PSet(dR_multicluster=cms.double(0.03),
94  dR_multicluster_byLayer_coefficientA=cms.vdouble(),
95  dR_multicluster_byLayer_coefficientB=cms.vdouble(),
96  shape_threshold=cms.double(1.),
97  shape_distance=cms.double(0.015),
98  minPt_multicluster=cms.double(0.5), # minimum pt of the multicluster (GeV)
99  cluster_association=cms.string("NearestNeighbour"),
100  EGIdentification=egamma_identification_histomax.clone(),
101  )
102 
103 
104 # V9 samples have a different defintion of the dEdx calibrations. To account for it
105 # we reascale the thresholds of the clustering seeds
106 # (see https://indico.cern.ch/event/806845/contributions/3359859/attachments/1815187/2966402/19-03-20_EGPerf_HGCBE.pdf
107 # for more details)
108 phase2_hgcalV9.toModify(histoMax_C3d_seeding_params,
109  threshold_histo_multicluster=7.5, # MipT
110  )
111 
112 
113 histoMaxVariableDR_C3d_params = histoMax_C3d_clustering_params.clone(
114  dR_multicluster = cms.double(0.),
115  dR_multicluster_byLayer_coefficientA = cms.vdouble(dr_layerbylayer),
116  dR_multicluster_byLayer_coefficientB = cms.vdouble([0]*(MAX_LAYERS+1))
117  )
118 
119 
120 histoSecondaryMax_C3d_params = histoMax_C3d_seeding_params.clone(
121  type_histoalgo = cms.string('HistoSecondaryMaxC3d')
122  )
123 
124 histoMaxXYVariableDR_C3d_params = histoMax_C3d_seeding_params.clone(
125  seeding_space=cms.string("XY"),
126  nBins_X1_histo_multicluster=cms.uint32(192),
127  nBins_X2_histo_multicluster=cms.uint32(192)
128  )
129 
130 histoInterpolatedMax_C3d_params = histoMax_C3d_seeding_params.clone(
131  type_histoalgo = cms.string('HistoInterpolatedMaxC3d')
132  )
133 
134 
135 histoThreshold_C3d_params = histoMax_C3d_seeding_params.clone(
136  type_histoalgo = cms.string('HistoThresholdC3d')
137  )
138 
139 
140 histoMax_C3d_params = cms.PSet(
141  type_multicluster=cms.string('Histo'),
142  histoMax_C3d_clustering_parameters = histoMaxVariableDR_C3d_params.clone(),
143  histoMax_C3d_seeding_parameters = histoMax_C3d_seeding_params.clone(),
144  )
145 
146 
147 energy_interpretations_em = cms.PSet(type = cms.string('HGCalTriggerClusterInterpretationEM'),
148  layer_containment_corrs = cms.vdouble(0., 0., 1.6144949, 0.92495334, 1.0820811, 0.9753549, 0.9742881, 1.0634482, 1.0599478, 0.9376349, 0.92587173, 0.8003076, 1.0417082, 1.7032381, 2.),
149  scale_correction_coeff = cms.vdouble(16.68182373, -8.487143517),
150  dr_bylayer = cms.vdouble([0.015]*15)
151  )
152 
153 phase2_hgcalV10.toModify(energy_interpretations_em,
154  layer_containment_corrs=cms.vdouble(0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.),
155  scale_correction_coeff=cms.vdouble(0., 0.),
156  )
157 
158 
159 energy_interpretations = cms.VPSet(energy_interpretations_em)
160 
161 be_proc = cms.PSet(ProcessorName = cms.string('HGCalBackendLayer2Processor3DClustering'),
162  C3d_parameters = histoMax_C3d_params.clone(),
163  energy_interpretations = energy_interpretations
164  )
165 
166 hgcalBackEndLayer2Producer = cms.EDProducer(
167  "HGCalBackendLayer2Producer",
168  InputCluster = cms.InputTag('hgcalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering'),
169  ProcessorParameters = be_proc.clone()
170  )