CMS 3D CMS Logo

mvaElectronID_Fall17_iso_V2_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 from os import path
4 
5 # Egamma presentation on this ID:
6 # https://indico.cern.ch/event/732971/contributions/3022864/attachments/1658765/2656595/180530_egamma.pdf
7 
8 mvaTag = "Fall17IsoV2"
9 
10 weightFileDir = "RecoEgamma/ElectronIdentification/data/MVAWeightFiles/Fall17IsoV2"
11 
12 mvaWeightFiles = [
13  path.join(weightFileDir, "EB1_5.weights.xml.gz"), # EB1_5
14  path.join(weightFileDir, "EB2_5.weights.xml.gz"), # EB2_5
15  path.join(weightFileDir, "EE_5.weights.xml.gz"), # EE_5
16  path.join(weightFileDir, "EB1_10.weights.xml.gz"), # EB1_10
17  path.join(weightFileDir, "EB2_10.weights.xml.gz"), # EB2_10
18  path.join(weightFileDir, "EE_10.weights.xml.gz"), # EE_10
19  ]
20 
21 mvaEleID_Fall17_iso_V2_wpHZZ_container = EleMVARaw_WP(
22  idName = "mvaEleID-Fall17-iso-V2-wpHZZ", mvaTag = mvaTag,
23  cutCategory0 = "1.26402092475", # EB1_5
24  cutCategory1 = "1.17808089508", # EB2_5
25  cutCategory2 = "1.33051972806", # EE_5
26  cutCategory3 = "2.36464785939", # EB1_10
27  cutCategory4 = "2.07880614597", # EB2_10
28  cutCategory5 = "1.08080644615", # EE_10
29  )
30 
31 mvaEleID_Fall17_iso_V2_wp80_container = EleMVARaw_WP(
32  idName = "mvaEleID-Fall17-iso-V2-wp80", mvaTag = mvaTag,
33  cutCategory0 = "3.53495358797 - exp(-pt / 3.07272325141) * 9.94262764352", # EB1_5
34  cutCategory1 = "3.06015605623 - exp(-pt / 1.95572234114) * 14.3091184421", # EB2_5
35  cutCategory2 = "3.02052519639 - exp(-pt / 1.59784164742) * 28.719380105", # EE_5
36  cutCategory3 = "7.35752275071 - exp(-pt / 15.87907864) * 7.61288809226", # EB1_10
37  cutCategory4 = "6.41811074032 - exp(-pt / 14.730562874) * 6.96387331587", # EB2_10
38  cutCategory5 = "5.64936312428 - exp(-pt / 16.3664949747) * 7.19607610311", # EE_10
39  )
40 
41 mvaEleID_Fall17_iso_V2_wpLoose_container = EleMVARaw_WP(
42  idName = "mvaEleID-Fall17-iso-V2-wpLoose", mvaTag = mvaTag,
43  cutCategory0 = "0.700642584415", # EB1_5
44  cutCategory1 = "0.739335420875", # EB2_5
45  cutCategory2 = "1.45390456109", # EE_5
46  cutCategory3 = "-0.146270871164", # EB1_10
47  cutCategory4 = "-0.0315850882679", # EB2_10
48  cutCategory5 = "-0.0321841194737", # EE_10
49  )
50 
51 mvaEleID_Fall17_iso_V2_wp90_container = EleMVARaw_WP(
52  idName = "mvaEleID-Fall17-iso-V2-wp90", mvaTag = mvaTag,
53  cutCategory0 = "2.84704783417 - exp(-pt / 3.32529515837) * 9.38050947827", # EB1_5
54  cutCategory1 = "2.03833922005 - exp(-pt / 1.93288758682) * 15.364588247", # EB2_5
55  cutCategory2 = "1.82704158461 - exp(-pt / 1.89796754399) * 19.1236071158", # EE_5
56  cutCategory3 = "6.12931925263 - exp(-pt / 13.281753835) * 8.71138432196", # EB1_10
57  cutCategory4 = "5.26289004857 - exp(-pt / 13.2154971491) * 8.0997882835", # EB2_10
58  cutCategory5 = "4.37338792902 - exp(-pt / 14.0776094696) * 8.48513324496", # EE_10
59  )
60 
61 
62 workingPoints = dict(
63  wpHZZ = mvaEleID_Fall17_iso_V2_wpHZZ_container,
64  wp80 = mvaEleID_Fall17_iso_V2_wp80_container,
65  wpLoose = mvaEleID_Fall17_iso_V2_wpLoose_container,
66  wp90 = mvaEleID_Fall17_iso_V2_wp90_container
67 )
68 
69 mvaEleID_Fall17_iso_V2_producer_config = cms.PSet(
70  mvaName = cms.string(mvaClassName),
71  mvaTag = cms.string(mvaTag),
72  nCategories = cms.int32(6),
73  categoryCuts = cms.vstring(*EleMVA_6CategoriesCuts),
74  weightFileNames = cms.vstring(*mvaWeightFiles),
75  variableDefinition = cms.string(mvaVariablesFile)
76  )
77 
78 mvaEleID_Fall17_iso_V2_wpHZZ = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wpHZZ_container )
79 mvaEleID_Fall17_iso_V2_wp80 = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wp80_container )
80 mvaEleID_Fall17_iso_V2_wpLoose = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wpLoose_container )
81 mvaEleID_Fall17_iso_V2_wp90 = configureVIDMVAEleID( mvaEleID_Fall17_iso_V2_wp90_container )
82 
83 mvaEleID_Fall17_iso_V2_wpHZZ.isPOGApproved = cms.untracked.bool(True)
84 mvaEleID_Fall17_iso_V2_wp80.isPOGApproved = cms.untracked.bool(True)
85 mvaEleID_Fall17_iso_V2_wpLoose.isPOGApproved = cms.untracked.bool(True)
86 mvaEleID_Fall17_iso_V2_wp90.isPOGApproved = cms.untracked.bool(True)
def configureVIDMVAEleID(mvaWP, cutName="GsfEleMVACut")