Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-14 02:53:35

0001 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
0002 from RecoEgamma.ElectronIdentification.Identification.mvaElectronID_tools import *
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 #
0006 # In this file we define the locations of the MVA weights, cuts on the MVA values
0007 # for specific working points, and configure those cuts in VID
0008 #
0009 
0010 #
0011 # The following MVA is tuned on Spring16 MC samples.
0012 # See more documentation in this presentation (P.Pigard):
0013 #    https://indico.cern.ch/event/491544/contributions/2321565/attachments/1346333/2030225/20160929_EGM_v4.pdf 
0014 #
0015 
0016 # The tag is an extra string attached to the names of the products
0017 # such as ValueMaps that needs to distinguish cases when the same MVA estimator
0018 # class is used with different tuning/weights
0019 mvaTag = "Spring16GeneralPurposeV1"
0020 
0021 # There are 3 categories in this MVA. They have to be configured in this strict order
0022 # (cuts and weight files order):
0023 #   0   EB1 (eta<0.8)  pt 10-inf GeV
0024 #   1   EB2 (eta>=0.8) pt 10-inf GeV
0025 #   2   EE             pt 10-inf GeV
0026 
0027 mvaSpring16WeightFiles_V1 = cms.vstring(
0028     "RecoEgamma/ElectronIdentification/data/Spring16_GeneralPurpose_V1/electronID_mva_Spring16_GeneralPurpose_V1_EB1_10.weights.root",
0029     "RecoEgamma/ElectronIdentification/data/Spring16_GeneralPurpose_V1/electronID_mva_Spring16_GeneralPurpose_V1_EB2_10.weights.root",
0030     "RecoEgamma/ElectronIdentification/data/Spring16_GeneralPurpose_V1/electronID_mva_Spring16_GeneralPurpose_V1_EE_10.weights.root"
0031     )
0032 
0033 ### WP to give about 90 and 80% signal efficiecny for electrons from Drell-Yan with pT > 25 GeV
0034 ### For turn-on and details see documentation linked above
0035 MVA_WP90 = EleMVA_WP(
0036     idName = "mvaEleID-Spring16-GeneralPurpose-V1-wp90", mvaTag = mvaTag,
0037     cutCategory0 =  "0.836695742607", # EB1
0038     cutCategory1 =  "0.715337944031", # EB2
0039     cutCategory2 =  "0.356799721718", # EE
0040     )
0041 MVA_WP80 = EleMVA_WP(
0042     idName = "mvaEleID-Spring16-GeneralPurpose-V1-wp80", mvaTag = mvaTag,
0043     cutCategory0 =  "0.940962684155", # EB1
0044     cutCategory1 =  "0.899208843708", # EB2
0045     cutCategory2 =  "0.758484721184", # EE
0046     )
0047 
0048 workingPoints = dict(
0049     wp80 = MVA_WP80,
0050     wp90 = MVA_WP90
0051 )
0052 
0053 #
0054 # Finally, set up VID configuration for all cuts
0055 #
0056 
0057 # Create the PSet that will be fed to the MVA value map producer
0058 mvaEleID_Spring16_GeneralPurpose_V1_producer_config = cms.PSet(
0059     mvaName            = cms.string(mvaClassName),
0060     mvaTag             = cms.string(mvaTag),
0061     # Category parameters
0062     nCategories         = cms.int32(3),
0063     categoryCuts        = cms.vstring(*EleMVA_3CategoriesCuts),
0064     # Weight files and variable definitions
0065     weightFileNames     = mvaSpring16WeightFiles_V1,
0066     variableDefinition  = cms.string(mvaVariablesFile)
0067     )
0068 # Create the VPset's for VID cuts
0069 mvaEleID_Spring16_GeneralPurpose_V1_wp90 = configureVIDMVAEleID( MVA_WP90 )
0070 mvaEleID_Spring16_GeneralPurpose_V1_wp80 = configureVIDMVAEleID( MVA_WP80 )
0071 
0072 
0073 # The MD5 sum numbers below reflect the exact set of cut variables
0074 # and values above. If anything changes, one has to 
0075 # 1) comment out the lines below about the registry, 
0076 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
0077 # 3) update the MD5 sum strings below and uncomment the lines again.
0078 #
0079 
0080 central_id_registry.register(mvaEleID_Spring16_GeneralPurpose_V1_wp90.idName,
0081                              '14c153aaf3c207deb3ad4932586647a7')
0082 central_id_registry.register(mvaEleID_Spring16_GeneralPurpose_V1_wp80.idName,
0083                              'b490bc0b0af2d5f3e9efea562370af2a')
0084 
0085 
0086 mvaEleID_Spring16_GeneralPurpose_V1_wp90.isPOGApproved = cms.untracked.bool(True)
0087 mvaEleID_Spring16_GeneralPurpose_V1_wp80.isPOGApproved = cms.untracked.bool(True)