Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:40

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from L1Trigger.L1THGCal.egammaIdentification import *
0004 
0005 def custom_identification_drnn_cone(process,
0006         working_points=tight_wp
0007         ):
0008     if len(working_points)!=len(working_points_drnn_cone):
0009         raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
0010                     len(working_points), len(working_points_drnn_cone)))
0011     for wp,cat in zip(working_points,working_points_drnn_cone):
0012         if not wp in cat:
0013             raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
0014     parameters_c3d = process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
0015     identification = egamma_identification_drnn_cone.clone(
0016             WorkingPoints = cms.vdouble(
0017                 [wps[eff] for wps,eff in zip(working_points_drnn_cone,working_points)]
0018                 )
0019             )
0020     parameters_c3d.EGIdentification = identification
0021     return process
0022 
0023 
0024 def custom_identification_drnn_dbscan(process,
0025         working_points=tight_wp
0026         ):
0027     if len(working_points)!=len(working_points_drnn_dbscan):
0028         raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
0029                     len(working_points), len(working_points_drnn_dbscan)))
0030     for wp,cat in zip(working_points,working_points_drnn_dbscan):
0031         if not wp in cat:
0032             raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
0033     parameters_c3d = process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
0034     identification = egamma_identification_drnn_dbscan.clone(
0035             WorkingPoints = cms.vdouble(
0036                 [wps[eff] for wps,eff in zip(working_points_drnn_dbscan,working_points)]
0037                 )
0038             )
0039     parameters_c3d.EGIdentification = identification
0040     return process
0041 
0042 
0043 def custom_identification_histomax(process,
0044         working_points=tight_wp
0045         ):
0046     if len(working_points)!=len(working_points_histomax):
0047         raise RuntimeError('HGC TPG ID: Number of working points ({0}) not compatible with number of categories ({1})'.format(
0048                     len(working_points), len(working_points_histomax)))
0049     for wp,cat in zip(working_points,working_points_drnn_dbscan):
0050         if not wp in cat:
0051             raise KeyError('HGC TPG ID: Cannot find a cut corresponding to the working point {}'.format(wp))
0052     parameters_c3d = process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
0053     identification = egamma_identification_histomax.clone(
0054             WorkingPoints = cms.vdouble(
0055                 [wps[eff] for wps,eff in zip(working_points_histomax,working_points)]
0056                 )
0057             )
0058     parameters_c3d.EGIdentification = identification
0059     return process