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 using non-triggering electrons.
0012 # This is ID only provides a very loose (~98% signal efficiency) working point and 
0013 # is intended to be used by multi-lepton analyses (HZZ, ZZ, ... ). Please consider 
0014 # using the general purpose ID.
0015 # See more documentation in this presentation (P.Pigard):
0016 #     https://indico.cern.ch/event/482674/contributions/2206032/attachments/1292177/1931287/20160621_EGM_cms_week_v5.pdf
0017 #
0018 
0019 # The tag is an extra string attached to the names of the products
0020 # such as ValueMaps that needs to distinguish cases when the same MVA estimator
0021 # class is used with different tuning/weights
0022 mvaTag = "Spring16HZZV1"
0023 
0024 # There are 6 categories in this MVA. They have to be configured in this strict order
0025 # (cuts and weight files order):
0026 #   0   EB1 (eta<0.8)  pt 5-10 GeV
0027 #   1   EB2 (eta>=0.8) pt 5-10 GeV
0028 #   2   EE             pt 5-10 GeV
0029 #   3   EB1 (eta<0.8)  pt 10-inf GeV
0030 #   4   EB2 (eta>=0.8) pt 10-inf GeV
0031 #   5   EE             pt 10-inf GeV
0032 
0033 mvaSpring16WeightFiles_V1 = cms.vstring(
0034     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EB1_5.weights.root",
0035     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EB2_5.weights.root",
0036     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EE_5.weights.root",
0037     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EB1_10.weights.root",
0038     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EB2_10.weights.root",
0039     "RecoEgamma/ElectronIdentification/data/Spring16_HZZ_V1/electronID_mva_Spring16_HZZ_V1_EE_10.weights.root"
0040     )
0041 
0042 ### WP tuned for HZZ analysis with very high efficiency (about 98%)
0043 idNameLoose = "mvaEleID-Spring16-HZZ-V1-wpLoose"
0044 MVA_WPLoose = EleMVA_WP(
0045     idNameLoose, mvaTag,
0046     cutCategory0 =  "-0.211", # EB1 low pt
0047     cutCategory1 =  "-0.396", # EB2 low pt
0048     cutCategory2 =  "-0.215", # EE low pt
0049     cutCategory3 =  "-0.870", # EB1
0050     cutCategory4 =  "-0.838", # EB2
0051     cutCategory5 =  "-0.763"  # EE
0052     )
0053 
0054 workingPoints = dict(
0055     wpLoose = MVA_WPLoose
0056 )
0057 
0058 
0059 #
0060 # Finally, set up VID configuration for all cuts
0061 #
0062 
0063 # Create the PSet that will be fed to the MVA value map producer
0064 mvaEleID_Spring16_HZZ_V1_producer_config = cms.PSet(
0065     mvaName            = cms.string(mvaClassName),
0066     mvaTag             = cms.string(mvaTag),
0067     # Category parameters
0068     nCategories         = cms.int32(6),
0069     categoryCuts        = cms.vstring(*EleMVA_6CategoriesCuts),
0070     # Weight files and variable definitions
0071     weightFileNames     = mvaSpring16WeightFiles_V1,
0072     variableDefinition  = cms.string(mvaVariablesFile)
0073     )
0074 # Create the VPset's for VID cuts
0075 mvaEleID_Spring16_HZZ_V1_wpLoose = configureVIDMVAEleID( MVA_WPLoose )
0076 
0077 
0078 # The MD5 sum numbers below reflect the exact set of cut variables
0079 # and values above. If anything changes, one has to 
0080 # 1) comment out the lines below about the registry, 
0081 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
0082 # 3) update the MD5 sum strings below and uncomment the lines again.
0083 #
0084 
0085 central_id_registry.register(mvaEleID_Spring16_HZZ_V1_wpLoose.idName,
0086                              '1797cc03eb62387e10266fca72ea10cd')
0087 
0088 mvaEleID_Spring16_HZZ_V1_wpLoose.isPOGApproved = cms.untracked.bool(True)