Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:08

0001 import FWCore.ParameterSet.Config as cms
0002 from RecoEgamma.ElectronIdentification.Identification.mvaElectronID_tools import *
0003 from os import path
0004 
0005 # Egamma presentation on this ID:
0006 # https://indico.cern.ch/event/732971/contributions/3022864/attachments/1658765/2656595/180530_egamma.pdf
0007 
0008 mvaTag = "Fall17IsoV2"
0009 
0010 weightFileDir = "RecoEgamma/ElectronIdentification/data/MVAWeightFiles/Fall17IsoV2"
0011 
0012 mvaWeightFiles = [
0013      path.join(weightFileDir, "EB1_5.weights.root"), # EB1_5
0014      path.join(weightFileDir, "EB2_5.weights.root"), # EB2_5
0015      path.join(weightFileDir, "EE_5.weights.root"), # EE_5
0016      path.join(weightFileDir, "EB1_10.weights.root"), # EB1_10
0017      path.join(weightFileDir, "EB2_10.weights.root"), # EB2_10
0018      path.join(weightFileDir, "EE_10.weights.root"), # EE_10
0019      ]
0020 
0021 mvaEleID_Fall17_iso_V2_wpHZZ_container = EleMVARaw_WP(
0022     idName = "mvaEleID-Fall17-iso-V2-wpHZZ", mvaTag = mvaTag,
0023     cutCategory0 = "1.26402092475", # EB1_5
0024     cutCategory1 = "1.17808089508", # EB2_5
0025     cutCategory2 = "1.33051972806", # EE_5
0026     cutCategory3 = "2.36464785939", # EB1_10
0027     cutCategory4 = "2.07880614597", # EB2_10
0028     cutCategory5 = "1.08080644615", # EE_10
0029     )
0030 
0031 mvaEleID_Fall17_iso_V2_wp80_container = EleMVARaw_WP(
0032     idName = "mvaEleID-Fall17-iso-V2-wp80", mvaTag = mvaTag,
0033     cutCategory0 = "3.53495358797 - exp(-pt / 3.07272325141) * 9.94262764352", # EB1_5
0034     cutCategory1 = "3.06015605623 - exp(-pt / 1.95572234114) * 14.3091184421", # EB2_5
0035     cutCategory2 = "3.02052519639 - exp(-pt / 1.59784164742) * 28.719380105", # EE_5
0036     cutCategory3 = "7.35752275071 - exp(-pt / 15.87907864) * 7.61288809226", # EB1_10
0037     cutCategory4 = "6.41811074032 - exp(-pt / 14.730562874) * 6.96387331587", # EB2_10
0038     cutCategory5 = "5.64936312428 - exp(-pt / 16.3664949747) * 7.19607610311", # EE_10
0039     )
0040 
0041 mvaEleID_Fall17_iso_V2_wpLoose_container = EleMVARaw_WP(
0042     idName = "mvaEleID-Fall17-iso-V2-wpLoose", mvaTag = mvaTag,
0043     cutCategory0 = "0.700642584415", # EB1_5
0044     cutCategory1 = "0.739335420875", # EB2_5
0045     cutCategory2 = "1.45390456109", # EE_5
0046     cutCategory3 = "-0.146270871164", # EB1_10
0047     cutCategory4 = "-0.0315850882679", # EB2_10
0048     cutCategory5 = "-0.0321841194737", # EE_10
0049     )
0050 
0051 mvaEleID_Fall17_iso_V2_wp90_container = EleMVARaw_WP(
0052     idName = "mvaEleID-Fall17-iso-V2-wp90", mvaTag = mvaTag,
0053     cutCategory0 = "2.84704783417 - exp(-pt / 3.32529515837) * 9.38050947827", # EB1_5
0054     cutCategory1 = "2.03833922005 - exp(-pt / 1.93288758682) * 15.364588247", # EB2_5
0055     cutCategory2 = "1.82704158461 - exp(-pt / 1.89796754399) * 19.1236071158", # EE_5
0056     cutCategory3 = "6.12931925263 - exp(-pt / 13.281753835) * 8.71138432196", # EB1_10
0057     cutCategory4 = "5.26289004857 - exp(-pt / 13.2154971491) * 8.0997882835", # EB2_10
0058     cutCategory5 = "4.37338792902 - exp(-pt / 14.0776094696) * 8.48513324496", # EE_10
0059     )
0060 
0061 
0062 workingPoints = dict(
0063     wpHZZ = mvaEleID_Fall17_iso_V2_wpHZZ_container,
0064     wp80 = mvaEleID_Fall17_iso_V2_wp80_container,
0065     wpLoose = mvaEleID_Fall17_iso_V2_wpLoose_container,
0066     wp90 = mvaEleID_Fall17_iso_V2_wp90_container
0067 )
0068 
0069 mvaEleID_Fall17_iso_V2_producer_config = cms.PSet(
0070     mvaName             = cms.string(mvaClassName),
0071     mvaTag              = cms.string(mvaTag),
0072     nCategories         = cms.int32(6),
0073     categoryCuts        = cms.vstring(*EleMVA_6CategoriesCuts),
0074     weightFileNames     = cms.vstring(*mvaWeightFiles),
0075     variableDefinition  = cms.string(mvaVariablesFile)
0076     )
0077 
0078 mvaEleID_Fall17_iso_V2_wpHZZ = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wpHZZ_container )
0079 mvaEleID_Fall17_iso_V2_wp80 = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wp80_container )
0080 mvaEleID_Fall17_iso_V2_wpLoose = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wpLoose_container )
0081 mvaEleID_Fall17_iso_V2_wp90 = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wp90_container )
0082 
0083 mvaEleID_Fall17_iso_V2_wpHZZ.isPOGApproved = cms.untracked.bool(True)
0084 mvaEleID_Fall17_iso_V2_wp80.isPOGApproved = cms.untracked.bool(True)
0085 mvaEleID_Fall17_iso_V2_wpLoose.isPOGApproved = cms.untracked.bool(True)
0086 mvaEleID_Fall17_iso_V2_wp90.isPOGApproved = cms.untracked.bool(True)