Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-29 02:32:47

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 PhaseII samples for photons.
0008 # See more documentation in these presentations:
0009 # https://indico.cern.ch/event/879937/contributions/4108370/attachments/2147472/3619954/Update_PhaseII_photonIDMVA_XGBoost_TMVA_Egamma_Prasant_20112020.pdf
0010 #
0011 
0012 ###################This ID is valid for Phase II EB only##############################3
0013 mvaTag = "PhaseIISummer20v0"
0014 mvaVariablesFile = "RecoEgamma/PhotonIdentification/data/PhotonMVAEstimatorRun2VariablesFall17V1p1.txt"
0015 mvaWeightFiles = [
0016     path.join(weightFileBaseDir, "PhaseII/PhotonID_MVA_barrel_Egamma_PhaseII_weight.xml.gz"),
0017     path.join(weightFileBaseDir, "PhaseII/PhotonID_MVA_barrel_Egamma_PhaseII_weight.xml.gz"), ###To avoid any crash let it be there
0018     ]
0019 # Set up the VID working point parameters
0020 wpConfig = [
0021             # The working point for this MVA that is expected to have about 90% signal
0022             # efficiency in each category for photons with pt>30 GeV (somewhat lower
0023             # for lower pt photons).
0024             {"idName" : "mvaPhoID-PhaseIISummer20-v0-wp90",
0025              "cuts"   : { "EB" : 0.737502,
0026                           "EE" : 0.737502 }},
0027             # The working point for this MVA that is expected to have about 90% signal
0028             # efficiency in each category for photons with pt>30 GeV (somewhat lower
0029             # for lower pt photons).
0030             {"idName" : "mvaPhoID-PhaseIISummer20-v0-wp80",
0031              "cuts"   : { "EB" : 0.875003,
0032                           "EE" : 0.875003 }},
0033            ]
0034 # Create the PSet that will be fed to the MVA value map producer and the
0035 # VPset's for VID cuts
0036 configs = configureFullVIDMVAPhoID(mvaTag=mvaTag,
0037                                    variablesFile=mvaVariablesFile,
0038                                    weightFiles=mvaWeightFiles,
0039                                    wpConfig=wpConfig,
0040                                    # Category parameters
0041                                    nCategories         = cms.int32(2),
0042                                    categoryCuts        = category_cuts)
0043 mvaPhoID_PhaseIISummer20_v0_producer_config = configs["producer_config"]
0044 mvaPhoID_PhaseIISummer20_v0_wp90            = configs["VID_config"]["mvaPhoID-PhaseIISummer20-v0-wp90"]
0045 mvaPhoID_PhaseIISummer20_v0_wp80            = configs["VID_config"]["mvaPhoID-PhaseIISummer20-v0-wp80"]
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_PhaseIISummer20_v0_wp90.idName,
0053                               'f5b754f8aaa045498630815ed6bc000e')
0054 central_id_registry.register( mvaPhoID_PhaseIISummer20_v0_wp80.idName,
0055                               'f8a37759d59521cb1a488aeb874b6140')
0056 mvaPhoID_PhaseIISummer20_v0_wp90.isPOGApproved = cms.bool(False)
0057 mvaPhoID_PhaseIISummer20_v0_wp80.isPOGApproved = cms.bool(False)