Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:10

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 # The following MVA is derived for Fall17 samples for non-triggering photons.
0007 # See more documentation in these presentations:
0008 # https://indico.cern.ch/event/662751/contributions/2778043/attachments/1562017/2459674/EGamma_WorkShop_21.11.17_Debabrata.pdf
0009 
0010 mvaTag                       = "RunIIFall17v1p1"
0011 mvaVariablesFile             = "RecoEgamma/PhotonIdentification/data/PhotonMVAEstimatorRun2VariablesFall17V1p1.txt"
0012 mvaWeightFiles = [
0013     path.join(weightFileBaseDir, "Fall17/EB_V1.weights.root"),
0014     path.join(weightFileBaseDir, "Fall17/EE_V1.weights.root"),
0015     ]
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-v1p1-wp90",
0023              "cuts"   : { "EB" : 0.27,
0024                           "EE" : 0.14 }},
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-v1p1-wp80",
0029              "cuts"   : { "EB" : 0.67,
0030                           "EE" : 0.54 }},
0031            ]
0032 
0033 # Create the PSet that will be fed to the MVA value map producer and the
0034 # VPset's for VID cuts
0035 configs = configureFullVIDMVAPhoID(mvaTag=mvaTag,
0036                                    variablesFile=mvaVariablesFile,
0037                                    weightFiles=mvaWeightFiles,
0038                                    wpConfig=wpConfig,
0039                                    # Category parameters
0040                                    nCategories         = cms.int32(2),
0041                                    categoryCuts        = category_cuts)
0042 mvaPhoID_RunIIFall17_v1p1_producer_config = configs["producer_config"]
0043 mvaPhoID_RunIIFall17_v1p1_wp90            = configs["VID_config"]["mvaPhoID-RunIIFall17-v1p1-wp90"]
0044 mvaPhoID_RunIIFall17_v1p1_wp80            = configs["VID_config"]["mvaPhoID-RunIIFall17-v1p1-wp80"]
0045 
0046 # The MD5 sum numbers below reflect the exact set of cut variables
0047 # and values above. If anything changes, one has to
0048 # 1) comment out the lines below about the registry,
0049 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0050 # 3) update the MD5 sum strings below and uncomment the lines again.
0051 
0052 central_id_registry.register( mvaPhoID_RunIIFall17_v1p1_wp90.idName,
0053                               '1120f91d15f68bf61b5f08958bf4f435')
0054 central_id_registry.register( mvaPhoID_RunIIFall17_v1p1_wp80.idName,
0055                               '56138c4a3ac3c0bffc7f01c187063102')
0056 
0057 mvaPhoID_RunIIFall17_v1p1_wp90.isPOGApproved = cms.untracked.bool(True)
0058 mvaPhoID_RunIIFall17_v1p1_wp80.isPOGApproved = cms.untracked.bool(True)