CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
customIdentification.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
6  working_points=tight_wp
7  ):
8  if len(working_points)!=len(working_points_drnn_cone):
9  raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
10  len(working_points), len(working_points_drnn_cone)))
11  for wp,cat in zip(working_points,working_points_drnn_cone):
12  if not wp in cat:
13  raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
14  parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
15  identification = egamma_identification_drnn_cone.clone(
16  WorkingPoints = cms.vdouble(
17  [wps[eff] for wps,eff in zip(working_points_drnn_cone,working_points)]
18  )
19  )
20  parameters_c3d.EGIdentification = identification
21  return process
22 
23 
25  working_points=tight_wp
26  ):
27  if len(working_points)!=len(working_points_drnn_dbscan):
28  raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
29  len(working_points), len(working_points_drnn_dbscan)))
30  for wp,cat in zip(working_points,working_points_drnn_dbscan):
31  if not wp in cat:
32  raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
33  parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
34  identification = egamma_identification_drnn_dbscan.clone(
35  WorkingPoints = cms.vdouble(
36  [wps[eff] for wps,eff in zip(working_points_drnn_dbscan,working_points)]
37  )
38  )
39  parameters_c3d.EGIdentification = identification
40  return process
41 
42 
44  working_points=tight_wp
45  ):
46  if len(working_points)!=len(working_points_histomax):
47  raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
48  len(working_points), len(working_points_histomax)))
49  for wp,cat in zip(working_points,working_points_drnn_dbscan):
50  if not wp in cat:
51  raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
52  parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
53  identification = egamma_identification_histomax.clone(
54  WorkingPoints = cms.vdouble(
55  [wps[eff] for wps,eff in zip(working_points_histomax,working_points)]
56  )
57  )
58  parameters_c3d.EGIdentification = identification
59  return process
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)