1 import FWCore.ParameterSet.Config
as cms
3 from Configuration.Eras.Modifier_phase2_hgcalV9_cff
import phase2_hgcalV9
4 from Configuration.Eras.Modifier_phase2_hgcalV10_cff
import phase2_hgcalV10
5 from Configuration.Eras.Modifier_phase2_hgcalV11_cff
import phase2_hgcalV11
7 inputs_small = [
'cl3d_firstlayer',
'cl3d_coreshowerlength',
'cl3d_maxlayer',
'cl3d_srrmean']
8 inputs_large = [
'cl3d_coreshowerlength',
'cl3d_showerlength',
'cl3d_firstlayer',
'cl3d_maxlayer',
'cl3d_szz',
'cl3d_srrmean',
'cl3d_srrtot',
'cl3d_seetot',
'cl3d_spptot']
11 def __init__(self, eta_min, eta_max, pt_min, pt_max):
20 Category(eta_min=1.5, eta_max=2.7, pt_min=0., pt_max=1e6),
22 Category(eta_min=2.7, eta_max=3.0, pt_min=0., pt_max=1e6),
26 bdt_weights_drnn_cone = [
28 'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_loweta_v0.xml',
30 'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_higheta_v0.xml',
33 working_points_drnn_cone = [
52 bdt_weights_drnn_dbscan = [
54 'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_loweta_v0.xml',
56 'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_higheta_v0.xml',
59 working_points_drnn_dbscan = [
77 input_features_histomax = {
78 "v8_352":inputs_small,
79 "v9_370":inputs_large,
80 "v9_394":inputs_large,
81 "v10_3151":inputs_large
84 bdt_weights_histomax = {
87 'L1Trigger/L1THGCal/data/egamma_id_histomax_352_loweta_v0.xml',
89 'L1Trigger/L1THGCal/data/egamma_id_histomax_352_higheta_v0.xml'
93 'L1Trigger/L1THGCal/data/egamma_id_histomax_370_loweta_v0.xml',
95 'L1Trigger/L1THGCal/data/egamma_id_histomax_370_higheta_v0.xml'
99 'L1Trigger/L1THGCal/data/egamma_id_histomax_394_loweta_v0.xml',
101 'L1Trigger/L1THGCal/data/egamma_id_histomax_394_higheta_v0.xml'
105 'L1Trigger/L1THGCal/data/egamma_id_histomax_3151_loweta_v0.xml',
107 'L1Trigger/L1THGCal/data/egamma_id_histomax_3151_higheta_v0.xml'
111 working_points_histomax = {
178 tight_wp = [
'975',
'900']
179 loose_wp = [
'995',
'950']
182 egamma_identification_drnn_cone = cms.PSet(
183 Inputs=cms.vstring(inputs_small),
184 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
185 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
186 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
187 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
188 Weights=cms.vstring(bdt_weights_drnn_cone),
189 WorkingPoints=cms.vdouble([wps[eff]
for wps,eff
in zip(working_points_drnn_cone,tight_wp)]),
192 egamma_identification_drnn_dbscan = cms.PSet(
193 Inputs=cms.vstring(inputs_small),
194 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
195 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
196 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
197 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
198 Weights=cms.vstring(bdt_weights_drnn_dbscan),
199 WorkingPoints=cms.vdouble([wps[eff]
for wps,eff
in zip(working_points_drnn_dbscan,tight_wp)]),
202 egamma_identification_histomax = cms.PSet(
203 Inputs=cms.vstring(input_features_histomax[
'v8_352']),
204 CategoriesEtaMin=cms.vdouble([cat.eta_min
for cat
in categories]),
205 CategoriesEtaMax=cms.vdouble([cat.eta_max
for cat
in categories]),
206 CategoriesPtMin=cms.vdouble([cat.pt_min
for cat
in categories]),
207 CategoriesPtMax=cms.vdouble([cat.pt_max
for cat
in categories]),
208 Weights=cms.vstring(bdt_weights_histomax[
'v8_352']),
209 WorkingPoints=cms.vdouble([wps[eff]
for wps,eff
in zip(working_points_histomax[
'v8_352'],tight_wp)]),
213 phase2_hgcalV9.toModify(egamma_identification_histomax,
214 Inputs=cms.vstring(input_features_histomax[
'v9_394']),
215 Weights=cms.vstring(bdt_weights_histomax[
'v9_394']),
216 WorkingPoints=cms.vdouble(
217 [wps[eff]
for wps,eff
in zip(working_points_histomax[
'v9_394'],tight_wp)]
221 phase2_hgcalV10.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)]
229 phase2_hgcalV11.toModify(egamma_identification_histomax,
230 Inputs=cms.vstring(input_features_histomax[
'v10_3151']),
231 Weights=cms.vstring(bdt_weights_histomax[
'v10_3151']),
232 WorkingPoints=cms.vdouble(
233 [wps[eff]
for wps,eff
in zip(working_points_histomax[
'v10_3151'],tight_wp)]