Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-14 22:56:06

0001 from RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_tools import *
0002 #
0003 # In this file we define the locations of the MVA weights, cuts on the MVA values
0004 # for specific working points, and configure those cuts in VID
0005 #
0006 #
0007 # The following MVA is derived for Fall17 samples for photons.
0008 # See more documentation in these presentations:
0009 # https://indico.cern.ch/event/697079/contributions/2968123/attachments/1632966/2604131/PhotonID_EGM_13.04.2018.pdf
0010 #
0011 mvaTag = "RunIIFall17v2"
0012 mvaVariablesFile = "RecoEgamma/PhotonIdentification/data/PhotonMVAEstimatorRun2VariablesFall17V1p1.txt"
0013 mvaWeightFiles = [
0014     path.join(weightFileBaseDir, "Fall17/EB_V2.weights.root"),
0015     path.join(weightFileBaseDir, "Fall17/EE_V2.weights.root"),
0016     ]
0017 # Set up the VID working point parameters
0018 wpConfig = [
0019             # The working point for this MVA that is expected to have about 90% signal
0020             # efficiency in each category for photons with pt>30 GeV (somewhat lower
0021             # for lower pt photons).
0022             {"idName" : "mvaPhoID-RunIIFall17-v2-wp90",
0023              "cuts"   : { "EB" : -0.02,
0024                           "EE" : -0.26 }},
0025             # The working point for this MVA that is expected to have about 90% signal
0026             # efficiency in each category for photons with pt>30 GeV (somewhat lower
0027             # for lower pt photons).
0028             {"idName" : "mvaPhoID-RunIIFall17-v2-wp80",
0029              "cuts"   : { "EB" : 0.42,
0030                           "EE" : 0.14 }},
0031            ]
0032 # Create the PSet that will be fed to the MVA value map producer and the
0033 # VPset's for VID cuts
0034 configs = configureFullVIDMVAPhoID(mvaTag=mvaTag,
0035                                    variablesFile=mvaVariablesFile,
0036                                    weightFiles=mvaWeightFiles,
0037                                    wpConfig=wpConfig,
0038                                    # Category parameters
0039                                    nCategories         = cms.int32(2),
0040                                    categoryCuts        = category_cuts)
0041 mvaPhoID_RunIIFall17_v2_producer_config = configs["producer_config"]
0042 mvaPhoID_RunIIFall17_v2_wp90            = configs["VID_config"]["mvaPhoID-RunIIFall17-v2-wp90"]
0043 mvaPhoID_RunIIFall17_v2_wp80            = configs["VID_config"]["mvaPhoID-RunIIFall17-v2-wp80"]
0044 # The MD5 sum numbers below reflect the exact set of cut variables
0045 # and values above. If anything changes, one has to
0046 # 1) comment out the lines below about the registry,
0047 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0048 # 3) update the MD5 sum strings below and uncomment the lines again.
0049 #
0050 central_id_registry.register( mvaPhoID_RunIIFall17_v2_wp90.idName,
0051                               '5c06832759b1faf7dd6fc45ed1aef3a2')
0052 central_id_registry.register( mvaPhoID_RunIIFall17_v2_wp80.idName,
0053                               '3013ddce7a3ad8b54827c29f5d92282e')
0054 mvaPhoID_RunIIFall17_v2_wp90.isPOGApproved = cms.bool(True)
0055 mvaPhoID_RunIIFall17_v2_wp80.isPOGApproved = cms.bool(True)