Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 # Common functions and classes for ID definition are imported here:
0007 from RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_tools \
0008     import ( WorkingPoint_V2,
0009              IsolationCutInputs,
0010              configureVIDCutBasedPhoID_V5 )             
0011 
0012 #
0013 # This is the first version of Spring16 cuts for 80X samples
0014 #
0015 # The cut values are taken from the twiki:
0016 #       https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2
0017 #       (where they may not stay, if a newer version of cuts becomes available for these
0018 #        conditions)
0019 # See also the presentation explaining these working points (this will not change):
0020 # https://indico.cern.ch/event/662751/contributions/2778043/attachments/1562017/2459674/EGamma_WorkShop_21.11.17_Debabrata.pdf 
0021 
0022 #
0023 # First, define cut values
0024 #
0025 
0026 # Loose working point Barrel and Endcap
0027 idName = "cutBasedPhotonID-Fall17-94X-V1-loose"
0028 WP_Loose_EB = WorkingPoint_V2(
0029     idName    ,  # idName
0030     0.043    ,  # hOverECut
0031     0.0101   ,  # full5x5_SigmaIEtaIEtaCut
0032 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0033     1.403     ,  # absPFChaHadIsoWithEACut_C1
0034     0         ,  # absPFChaHadIsoWithEACut_C2
0035     15.959    ,  # absPFNeuHadIsoWithEACut_C1
0036     0.0127    ,  # absPFNeuHadIsoWithEACut_C2
0037     0.000026  ,  # absPFNeuHadIsoWithEACut_C3
0038     3.06     ,  # absPFPhoIsoWithEACut_C1
0039     0.0038       # absPFPhoIsoWithEACut_C2
0040     )
0041 WP_Loose_EE = WorkingPoint_V2(
0042     idName    ,  #idName
0043     0.026    ,  # hOverECut
0044     0.0267   ,  # full5x5_SigmaIEtaIEtaCut
0045 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0046     2.809     ,  # absPFChaHadIsoWithEACut_C1
0047     0.00      ,  # absPFChaHadIsoWithEACut_C2
0048     7.056     ,  # absPFNeuHadIsoWithEACut_C1
0049     0.0117    ,  # absPFNeuHadIsoWithEACut_C2
0050     0.000025  ,  # absPFNeuHadIsoWithEACut_C3
0051     4.766     ,  # absPFPhoIsoWithEACut_C1
0052     0.0038       # absPFPhoIsoWithEACut_C2
0053     )
0054 
0055 # Medium working point Barrel and Endcap
0056 idName = "cutBasedPhotonID-Fall17-94X-V1-medium"
0057 WP_Medium_EB = WorkingPoint_V2(
0058     idName    ,  # idName
0059     0.032    ,  # hOverECut
0060     0.0101   ,  # full5x5_SigmaIEtaIEtaCut
0061 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0062     0.43     ,  # absPFChaHadIsoWithEACut_C1
0063     0.00      ,  # absPFChaHadIsoWithEACut_C2
0064     2.133     ,  # absPFNeuHadIsoWithEACut_C1
0065     0.0127    ,  # absPFNeuHadIsoWithEACut_C2
0066     0.000026  ,  # absPFNeuHadIsowithEACut_C3 
0067     2.344     ,  # absPFPhoIsoWithEACut_C1
0068     0.0038       # absPFPhoIsoWithEACut_C2
0069     )
0070 
0071 WP_Medium_EE = WorkingPoint_V2(
0072     idName    ,  #idName
0073     0.0219    ,  # hOverECut
0074     0.03001   ,  # full5x5_SigmaIEtaIEtaCut
0075 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0076     0.442     ,  # absPFChaHadIsoWithEACut_C1
0077     0.00      ,  # absPFChaHadIsoWithEACut_C2
0078     1.715     ,  # absPFNeuHadIsoWithEACut_C1
0079     0.0117    ,  # absPFNeuHadIsoWithEACut_C2
0080     0.000025  ,  # absPFNeuHadIsowithEACut_C3 
0081     3.863     ,  # absPFPhoIsoWithEACut_C1
0082     0.0038       # absPFPhoIsoWithEACut_C2
0083     )
0084 
0085 # Tight working point Barrel and Endcap
0086 idName = "cutBasedPhotonID-Fall17-94X-V1-tight"
0087 WP_Tight_EB = WorkingPoint_V2(
0088     idName    ,  # idName
0089     0.022    ,  # hOverECut
0090     0.0099   ,  # full5x5_SigmaIEtaIEtaCut
0091 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0092     0.101     ,  # absPFChaHadIsoWithEACut_C1
0093     0.00      ,  # absPFChaHadIsoWithEACut_C2
0094     0.137     ,  # absPFNeuHadIsoWithEACut_C1
0095     0.0127    ,  # absPFNeuHadIsoWithEACut_C2
0096     0.000026  ,  # absPFNeuHadIsowithEACut_C3
0097     2.308     ,  # absPFPhoIsoWithEACut_C1
0098     0.0038       # absPFPhoIsoWithEACut_C2
0099     )
0100 
0101 WP_Tight_EE = WorkingPoint_V2(
0102     idName    ,  #idName
0103     0.021    ,  # hOverECut
0104     0.0267   ,  # full5x5_SigmaIEtaIEtaCut
0105 # Isolation cuts are generally absIso < C1 + pt*C2, except for NeuHad is < C1 + pt*C2 + pt*pt*C3
0106     0.134     ,  # absPFChaHadIsoWithEACut_C1
0107     0.00      ,  # absPFChaHadIsoWithEACut_C2
0108     1.615     ,  # absPFNeuHadIsoWithEACut_C1
0109     0.0117    ,  # absPFNeuHadIsoWithEACut_C2
0110     0.000025  ,  # absPFNeuHadIsowithEACut_C3    
0111     3.107     ,  # absPFPhoIsoWithEACut_C1
0112     0.0038       # absPFPhoIsoWithEACut_C2
0113     )
0114 
0115 
0116 # Second, define where to find the precomputed isolations and what effective
0117 # areas to use for pile-up correction
0118 isoInputs = IsolationCutInputs(
0119     # chHadIsolationMapName  
0120     'photonIDValueMapProducer:phoChargedIsolation' ,
0121     # chHadIsolationEffAreas 
0122     "RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfChargedHadrons_90percentBased.txt",
0123     # neuHadIsolationMapName
0124     'photonIDValueMapProducer:phoNeutralHadronIsolation' ,
0125     # neuHadIsolationEffAreas
0126     "RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased.txt" ,
0127     # phoIsolationMapName  
0128     "photonIDValueMapProducer:phoPhotonIsolation" ,
0129     # phoIsolationEffAreas
0130     "RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfPhotons_90percentBased.txt"
0131 )
0132 
0133 #
0134 # Finally, set up VID configuration for all cuts
0135 #
0136 cutBasedPhotonID_Fall17_94X_V1_loose  = configureVIDCutBasedPhoID_V5 ( WP_Loose_EB, WP_Loose_EE, isoInputs)
0137 cutBasedPhotonID_Fall17_94X_V1_medium = configureVIDCutBasedPhoID_V5 ( WP_Medium_EB, WP_Medium_EE, isoInputs)
0138 cutBasedPhotonID_Fall17_94X_V1_tight  = configureVIDCutBasedPhoID_V5 ( WP_Tight_EB, WP_Tight_EE, isoInputs)
0139 
0140 ## The MD5 sum numbers below reflect the exact set of cut variables
0141 # and values above. If anything changes, one has to 
0142 # 1) comment out the lines below about the registry, 
0143 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
0144 # 3) update the MD5 sum strings below and uncomment the lines again.
0145 #
0146 
0147 central_id_registry.register(cutBasedPhotonID_Fall17_94X_V1_loose.idName,
0148                              '08547098f52eb608b545953f02583c3f')
0149 central_id_registry.register(cutBasedPhotonID_Fall17_94X_V1_medium.idName,
0150                              'fb58ccd713d6be1f86f1d2e48c69e401')
0151 central_id_registry.register(cutBasedPhotonID_Fall17_94X_V1_tight.idName,
0152                              '296da1cdbf6f35a99287c5a527472ed3')
0153 cutBasedPhotonID_Fall17_94X_V1_loose.isPOGApproved = cms.untracked.bool(True)
0154 cutBasedPhotonID_Fall17_94X_V1_medium.isPOGApproved = cms.untracked.bool(True)
0155 cutBasedPhotonID_Fall17_94X_V1_tight.isPOGApproved = cms.untracked.bool(True)