Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:27

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 derived for 50ns Spring15 MC samples for triggering electrons.
0012 # See more documentation in this presentation (P.Pigard):
0013 #     https://indico.cern.ch/event/369245/contribution/3/attachments/1153011/1655996/20150910_EID_POG_vAsPresented.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 = "Spring15Trig50nsV1"
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)  
0024 #   1   EB2 (eta>=0.8) 
0025 #   2   EE
0026 
0027 mvaSpring15TrigWeightFiles_V1 = cms.vstring(
0028     "RecoEgamma/ElectronIdentification/data/Spring15/EIDmva_EB1_10_oldTrigSpring15_50ns_data_1_VarD_TMVA412_Sig6BkgAll_MG_noSpec_BDT.weights.xml.gz",
0029     "RecoEgamma/ElectronIdentification/data/Spring15/EIDmva_EB2_10_oldTrigSpring15_50ns_data_1_VarD_TMVA412_Sig6BkgAll_MG_noSpec_BDT.weights.xml.gz",
0030     "RecoEgamma/ElectronIdentification/data/Spring15/EIDmva_EE_10_oldTrigSpring15_50ns_data_1_VarD_TMVA412_Sig6BkgAll_MG_noSpec_BDT.weights.xml.gz"
0031     )
0032 
0033 # The working point for this MVA that is expected to have about 90% signal
0034 # efficiency in each category
0035 idName90 = "mvaEleID-Spring15-50ns-Trig-V1-wp90"
0036 MVA_WP90 = EleMVA_WP(
0037     idName = idName90, mvaTag = mvaTag,
0038     cutCategory0 = "0.953843", # EB1 
0039     cutCategory1 = "0.849994", # EB2 
0040     cutCategory2 = "0.514118"  # EE 
0041     )
0042 
0043 idName80 = "mvaEleID-Spring15-50ns-Trig-V1-wp80"
0044 MVA_WP80 = EleMVA_WP(
0045     idName = idName80, mvaTag = mvaTag,
0046     cutCategory0 = "0.981841", # EB1 
0047     cutCategory1 = "0.946762", # EB2 
0048     cutCategory2 = "0.79704"  # EE 
0049     )
0050 
0051 #
0052 # Finally, set up VID configuration for all cuts
0053 #
0054 
0055 # Create the PSet that will be fed to the MVA value map producer
0056 mvaEleID_Spring15_50ns_Trig_V1_producer_config = cms.PSet( 
0057     mvaName            = cms.string(mvaClassName),
0058     mvaTag             = cms.string(mvaTag),
0059     # Category parameters
0060     nCategories         = cms.int32(3),
0061     categoryCuts        = cms.vstring(*EleMVA_3CategoriesCuts),
0062     # Weight files and variable definitions
0063     weightFileNames     = mvaSpring15TrigWeightFiles_V1,
0064     variableDefinition  = cms.string(mvaVariablesFile)
0065     )
0066 # Create the VPset's for VID cuts
0067 mvaEleID_Spring15_50ns_Trig_V1_wp90 = configureVIDMVAEleID( MVA_WP90 )
0068 mvaEleID_Spring15_50ns_Trig_V1_wp80 = configureVIDMVAEleID( MVA_WP80 )
0069 
0070 # The MD5 sum numbers below reflect the exact set of cut variables
0071 # and values above. If anything changes, one has to 
0072 # 1) comment out the lines below about the registry, 
0073 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
0074 # 3) update the MD5 sum strings below and uncomment the lines again.
0075 #
0076 
0077 central_id_registry.register(mvaEleID_Spring15_50ns_Trig_V1_wp90.idName,
0078                              'b2c90992b008ddca2daf74fe578e7e1b')
0079 central_id_registry.register(mvaEleID_Spring15_50ns_Trig_V1_wp80.idName,
0080                              'e9127ba0788d88aa64abe68b13749519')
0081 
0082 mvaEleID_Spring15_50ns_Trig_V1_wp90.isPOGApproved = cms.untracked.bool(True)
0083 mvaEleID_Spring15_50ns_Trig_V1_wp80.isPOGApproved = cms.untracked.bool(True)