1 import FWCore.ParameterSet.Config
as cms
3 from Configuration.Eras.Modifier_phase2_hgcalV10_cff
import phase2_hgcalV10
4 from Configuration.Eras.Modifier_phase2_hgcalV11_cff
import phase2_hgcalV11
6 inputs_small = [
'cl3d_firstlayer',
'cl3d_coreshowerlength',
'cl3d_maxlayer',
'cl3d_srrmean']
7 inputs_large = [
'cl3d_coreshowerlength',
'cl3d_showerlength',
'cl3d_firstlayer',
'cl3d_maxlayer',
'cl3d_szz',
'cl3d_srrmean',
'cl3d_srrtot',
'cl3d_seetot',
'cl3d_spptot']
10 def __init__(self, eta_min, eta_max, pt_min, pt_max):
19 Category(eta_min=1.5, eta_max=2.7, pt_min=0., pt_max=1e6),
21 Category(eta_min=2.7, eta_max=3.0, pt_min=0., pt_max=1e6),
25 bdt_weights_drnn_cone = [
27 'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_loweta_v0.xml',
29 'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_higheta_v0.xml',
32 working_points_drnn_cone = [
51 bdt_weights_drnn_dbscan = [
53 'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_loweta_v0.xml',
55 'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_higheta_v0.xml',
58 working_points_drnn_dbscan = [
76 input_features_histomax = {
77 "v8_352":inputs_small,
78 "v9_370":inputs_large,
79 "v9_394":inputs_large,
80 "v10_3151":inputs_large
83 bdt_weights_histomax = {
86 'L1Trigger/L1THGCal/data/egamma_id_histomax_352_loweta_v0.xml',
88 'L1Trigger/L1THGCal/data/egamma_id_histomax_352_higheta_v0.xml'
92 'L1Trigger/L1THGCal/data/egamma_id_histomax_370_loweta_v0.xml',
94 'L1Trigger/L1THGCal/data/egamma_id_histomax_370_higheta_v0.xml'
98 'L1Trigger/L1THGCal/data/egamma_id_histomax_394_loweta_v0.xml',
100 'L1Trigger/L1THGCal/data/egamma_id_histomax_394_higheta_v0.xml'
104 'L1Trigger/L1THGCal/data/egamma_id_histomax_3151_loweta_v0.xml',
106 'L1Trigger/L1THGCal/data/egamma_id_histomax_3151_higheta_v0.xml'
110 working_points_histomax = {
177 tight_wp = [
'975',
'900']
178 loose_wp = [
'995',
'950']
181 egamma_identification_drnn_cone = cms.PSet(
182 Inputs=cms.vstring(inputs_small),
183 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
184 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
185 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
186 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
187 Weights=cms.vstring(bdt_weights_drnn_cone),
188 WorkingPoints=cms.vdouble([wps[eff]
for wps,eff
in zip(working_points_drnn_cone,tight_wp)]),
191 egamma_identification_drnn_dbscan = cms.PSet(
192 Inputs=cms.vstring(inputs_small),
193 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
194 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
195 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
196 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
197 Weights=cms.vstring(bdt_weights_drnn_dbscan),
198 WorkingPoints=cms.vdouble([wps[eff]
for wps,eff
in zip(working_points_drnn_dbscan,tight_wp)]),
201 egamma_identification_histomax = cms.PSet(
202 Inputs=cms.vstring(input_features_histomax[
'v10_3151']),
203 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
204 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
205 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
206 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
207 Weights=cms.vstring(bdt_weights_histomax[
'v10_3151']),
208 WorkingPoints=cms.vdouble(
209 [wps[eff]
for wps,eff
in zip(working_points_histomax[
'v10_3151'],tight_wp)]
213 phase2_hgcalV10.toModify(egamma_identification_histomax,
214 Inputs=cms.vstring(input_features_histomax[
'v10_3151']),
215 Weights=cms.vstring(bdt_weights_histomax[
'v10_3151']),
216 WorkingPoints=cms.vdouble(
217 [wps[eff]
for wps,eff
in zip(working_points_histomax[
'v10_3151'],tight_wp)]
221 phase2_hgcalV11.toModify(egamma_identification_histomax,
222 Inputs=cms.vstring(input_features_histomax[
'v10_3151']),
223 Weights=cms.vstring(bdt_weights_histomax[
'v10_3151']),
224 WorkingPoints=cms.vdouble(
225 [wps[eff]
for wps,eff
in zip(working_points_histomax[
'v10_3151'],tight_wp)]
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)