CMS 3D CMS Logo

egammaIdentification.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 class Category:
5  def __init__(self, eta_min, eta_max, pt_min, pt_max):
6  self.eta_min = eta_min
7  self.eta_max = eta_max
8  self.pt_min = pt_min
9  self.pt_max = pt_max
10 
11 
12 categories = [
13  # Low eta
14  Category(eta_min=1.5, eta_max=2.7, pt_min=0., pt_max=1e6),
15  # High eta
16  Category(eta_min=2.7, eta_max=3.0, pt_min=0., pt_max=1e6),
17  ]
18 
19 # Identification for dRNN 2D clustering and cone 3D clustering
20 bdt_weights_drnn_cone = [
21  # Low eta
22  'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_loweta_v0.xml',
23  # High eta
24  'L1Trigger/L1THGCal/data/egamma_id_drnn_cone_higheta_v0.xml',
25  ]
26 
27 working_points_drnn_cone = [
28  # Low eta
29  {
30  '900':0.14057436,
31  '950':0.05661769,
32  '975':-0.01481255,
33  '995':-0.19656579,
34  },
35  # High eta
36  {
37  '900':0.05995301,
38  '950':-0.02947988,
39  '975':-0.10577436,
40  '995':-0.26401181,
41  },
42  ]
43 
44 
45 # Identification for dRNN 2D clustering and DBSCAN 3D clustering
46 bdt_weights_drnn_dbscan = [
47  # Low eta
48  'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_loweta_v0.xml',
49  # High eta
50  'L1Trigger/L1THGCal/data/egamma_id_drnn_dbscan_higheta_v0.xml',
51  ]
52 
53 working_points_drnn_dbscan = [
54  # Low eta
55  {
56  '900':0.08421164,
57  '950':0.06436077,
58  '975':-0.04547527,
59  '995':-0.23717142,
60  },
61  # High eta
62  {
63  '900':0.05559443,
64  '950':-0.0171725,
65  '975':-0.10630798,
66  '995':-0.27290947,
67  },
68  ]
69 
70 # Identification for 3D HistoMax clustering (as in 3.5.2)
71 bdt_weights_histomax = [
72  # Low eta
73  'L1Trigger/L1THGCal/data/egamma_id_histomax_352_loweta_v0.xml',
74  # High eta
75  'L1Trigger/L1THGCal/data/egamma_id_histomax_352_higheta_v0.xml',
76  ]
77 
78 working_points_histomax = [
79  # Low eta
80  {
81  '900':0.19146989,
82  '950':0.1379665 ,
83  '975':0.03496629,
84  '995':-0.24383164,
85  },
86  # High eta
87  {
88  '900':0.13347613,
89  '950':0.04267797,
90  '975':-0.03698097,
91  '995':-0.23077505,
92  },
93  ]
94 
95 tight_wp = ['975', '900']
96 loose_wp = ['995', '950']
97 
98 
99 egamma_identification_drnn_cone = cms.PSet(
100  Inputs=cms.vstring('cl3d_firstlayer', 'cl3d_coreshowerlength', 'cl3d_maxlayer', 'cl3d_srrmean'),
101  CategoriesEtaMin=cms.vdouble([cat.eta_min for cat in categories]),
102  CategoriesEtaMax=cms.vdouble([cat.eta_max for cat in categories]),
103  CategoriesPtMin=cms.vdouble([cat.pt_min for cat in categories]),
104  CategoriesPtMax=cms.vdouble([cat.pt_max for cat in categories]),
105  Weights=cms.vstring(bdt_weights_drnn_cone),
106  WorkingPoints=cms.vdouble([wps[eff] for wps,eff in zip(working_points_drnn_cone,tight_wp)]),
107  )
108 
109 egamma_identification_drnn_dbscan = cms.PSet(
110  Inputs=cms.vstring('cl3d_firstlayer', 'cl3d_coreshowerlength', 'cl3d_maxlayer', 'cl3d_srrmean'),
111  CategoriesEtaMin=cms.vdouble([cat.eta_min for cat in categories]),
112  CategoriesEtaMax=cms.vdouble([cat.eta_max for cat in categories]),
113  CategoriesPtMin=cms.vdouble([cat.pt_min for cat in categories]),
114  CategoriesPtMax=cms.vdouble([cat.pt_max for cat in categories]),
115  Weights=cms.vstring(bdt_weights_drnn_dbscan),
116  WorkingPoints=cms.vdouble([wps[eff] for wps,eff in zip(working_points_drnn_dbscan,tight_wp)]),
117  )
118 
119 egamma_identification_histomax = cms.PSet(
120  Inputs=cms.vstring('cl3d_firstlayer', 'cl3d_coreshowerlength', 'cl3d_maxlayer', 'cl3d_srrmean'),
121  CategoriesEtaMin=cms.vdouble([cat.eta_min for cat in categories]),
122  CategoriesEtaMax=cms.vdouble([cat.eta_max for cat in categories]),
123  CategoriesPtMin=cms.vdouble([cat.pt_min for cat in categories]),
124  CategoriesPtMax=cms.vdouble([cat.pt_max for cat in categories]),
125  Weights=cms.vstring(bdt_weights_histomax),
126  WorkingPoints=cms.vdouble([wps[eff] for wps,eff in zip(working_points_histomax,tight_wp)]),
127  )
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def __init__(self, eta_min, eta_max, pt_min, pt_max)