Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-09 11:30:01

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 Winter22 Gjet samples in CMSSW_12_2_1 campaign for photons.
0008 #See more documentation in these presentations:
0009 #https://indico.cern.ch/event/1182858/#2-update-on-run3-photon-mva-id
0010 #https://indico.cern.ch/event/1188686/#2-update-on-run3-photon-mva-id
0011 #https://indico.cern.ch/event/1192144/#2-update-on-run3-photon-mva-id
0012 #https://indico.cern.ch/event/1192146/#2-update-on-run3-photon-mva-id
0013 #https://indico.cern.ch/event/1192145/#2-update-on-run3-photon-mva-id
0014 #https://indico.cern.ch/event/1204272/#2-update-on-run3-photon-mva-id
0015 #
0016 #
0017  
0018 mvaTag = "RunIIIWinter22v1"
0019 mvaVariablesFile = "RecoEgamma/PhotonIdentification/data/PhotonMVAEstimatorRun3VariablesWinter22V1.txt"
0020 mvaWeightFiles = [
0021     path.join(weightFileBaseDir, "RunIII_Winter22/PhoMVA_ID_EB_V1.weights.root"),
0022     path.join(weightFileBaseDir, "RunIII_Winter22/PhoMVA_ID_EE_V1.weights.root"),
0023     ]
0024 # Set up the VID working point parameters
0025 wpConfig = [
0026             # The working point for this MVA that is expected to have about 90% signal
0027             # efficiency in each category for photons with pt>10 GeV.
0028             {"idName" : "mvaPhoID-RunIIIWinter22-v1-wp90",
0029              "cuts"   : { "EB" : 0.0439603,
0030                           "EE" : -0.249526 }},
0031             # The working point for this MVA that is expected to have about 90% signal
0032             # efficiency in each category for photons with pt>10 GeV.
0033             {"idName" : "mvaPhoID-RunIIIWinter22-v1-wp80",
0034              "cuts"   : { "EB" : 0.420473,
0035                           "EE" : 0.203451 }},
0036            ]
0037 # Create the PSet that will be fed to the MVA value map producer and the
0038 # VPset's for VID cuts
0039 configs = configureFullVIDMVAPhoID(mvaTag=mvaTag,
0040                                    variablesFile=mvaVariablesFile,
0041                                    weightFiles=mvaWeightFiles,
0042                                    wpConfig=wpConfig,
0043                                    # Category parameters
0044                                    nCategories         = cms.int32(2),
0045                                    categoryCuts        = category_cuts)
0046 mvaPhoID_RunIIIWinter22_v1_producer_config = configs["producer_config"]
0047 mvaPhoID_RunIIIWinter22_v1_wp90            = configs["VID_config"]["mvaPhoID-RunIIIWinter22-v1-wp90"]
0048 mvaPhoID_RunIIIWinter22_v1_wp80            = configs["VID_config"]["mvaPhoID-RunIIIWinter22-v1-wp80"]
0049 # The MD5 sum numbers below reflect the exact set of cut variables
0050 # and values above. If anything changes, one has to
0051 # 1) comment out the lines below about the registry,
0052 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0053 # 3) update the MD5 sum strings below and uncomment the lines again.
0054 #
0055 
0056 central_id_registry.register( mvaPhoID_RunIIIWinter22_v1_wp90.idName,
0057                               '2720b451f89dd72162f4a1de626a03ee098c8352')
0058 central_id_registry.register( mvaPhoID_RunIIIWinter22_v1_wp80.idName,
0059                               'c198ffac6a62f5b64b1db5190048903722d29a66')
0060 mvaPhoID_RunIIIWinter22_v1_wp90.isPOGApproved = cms.bool(True)
0061 mvaPhoID_RunIIIWinter22_v1_wp80.isPOGApproved = cms.bool(True)