Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 # Common functions and classes for ID definition are imported here:
0006 from RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_tools \
0007     import ( WorkingPoint_V3,
0008              IsolationCutInputs,
0009              ClusterIsolationCutInputs,
0010              HoverECutInputs,
0011              configureVIDCutBasedPhoID_V6 )
0012 #
0013 # Details of the ID values can be found in the following link
0014 # https://indico.cern.ch/event/1204277/#5-update-on-run3-photon-cut-ba
0015 #
0016 
0017 #
0018 # First, define cut values
0019 #
0020 
0021 
0022 # Loose working point Barrel and Endcap
0023 idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-loose"
0024 WP_Loose_EB = WorkingPoint_V3(
0025     idName     ,  # idName
0026     0.011452   ,  # full5x5_SigmaIEtaIEtaCut
0027     0.12999    ,  # hOverEWithEACut
0028 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0029     1.8852     ,  # absPFChgHadIsoWithEACut_C1
0030     0.0        ,  # absPFChgHadIsoWithEACut_C2
0031     0.70379    ,  # absPFECalClusIsoWithEACut_C1
0032     0.00065204 ,  # absPFECalClusIsoWithEACut_C2
0033     6.3440     ,  # absPFHCalClusIsoWithEACut_C1
0034     0.010055   ,  # absPFHCalClusIsoWithEACut_C2
0035     0.00005783    # absPFHCalClusIsoWithEACut_C3
0036     )
0037 WP_Loose_EE = WorkingPoint_V3(
0038     idName     ,  # idName
0039     0.027674   ,  # full5x5_SigmaIEtaIEtaCut
0040     0.15343    ,  # hOverEWithEACut
0041 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0042     1.6540     ,  # absPFChgHadIsoWithEACut_C1
0043     0.0        ,  # absPFChgHadIsoWithEACut_C2
0044     6.61585    ,  # absPFECalClusIsoWithEACut_C1
0045     0.00019549 ,  # absPFECalClusIsoWithEACut_C2
0046     1.8588     ,  # absPFHCalClusIsoWithEACut_C1
0047     0.01170    ,  # absPFHCalClusIsoWithEACut_C2
0048     0.00007476    # absPFHCalClusIsoWithEACut_C3
0049     )
0050 
0051 
0052 
0053 # Medium working point Barrel and Endcap
0054 idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-medium"
0055 WP_Medium_EB = WorkingPoint_V3(
0056     idName     ,  # idName
0057     0.01001    ,  # full5x5_SigmaIEtaIEtaCut
0058     0.058305   ,  # hOverEWithEACut
0059 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0060     0.93929    ,  # absPFChgHadIsoWithEACut_C1
0061     0.0        ,  # absPFChgHadIsoWithEACut_C2
0062     0.22770    ,  # absPFECalClusIsoWithEACut_C1
0063     0.00065204 ,  # absPFECalClusIsoWithEACut_C2
0064     2.1890     ,  # absPFHCalClusIsoWithEACut_C1
0065     0.010055   ,  # absPFHCalClusIsoWithEACut_C2
0066     0.00005783    # absPFHCalClusIsoWithEACut_C3
0067     )
0068 
0069 WP_Medium_EE = WorkingPoint_V3(
0070     idName     ,  #idName
0071     0.02687    ,  # full5x5_SigmaIEtaIEtaCut
0072     0.005181   ,  # hOverECutWithEA
0073 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0074     0.97029    ,  # absPFChgHadIsoWithEACut_C1
0075     0.0        ,  # absPFChaHadIsoWithEACut_C2
0076     1.124      ,  # absPFECalClusIsoWithEACut_C1
0077     0.00019549 ,  # absPFECalClusIsoWithEACut_C2
0078     0.033670   ,  # absPFHCalClusIsowithEACut_C1
0079     0.01170    ,  # absPFHCalClusIsoWithEACut_C2
0080     0.00007476    # absPFHCalClusIsoWithEACut_C3
0081     )
0082 
0083 
0084 
0085 # Tight working point Barrel and Endcap
0086 idName = "cutBasedPhotonID-RunIIIWinter22-122X-V1-tight"
0087 WP_Tight_EB = WorkingPoint_V3(
0088     idName     ,  # idName
0089     0.009993   ,  # full5x5_SigmaIEtaIEtaCut
0090     0.0417588  ,  # hOverECutWithEA
0091 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0092     0.31631    ,  # absPFChgHadIsoWithEACut_C1
0093     0.0        ,  # absPFChgHadIsoWithEACut_C2
0094     0.14189    ,  # absPFECalClusIsoWithEACut_C1
0095     0.00065204 ,  # absPFECalClusIsoWithEACut_C2
0096     0.39057    ,  # absPFHCalClusIsoWithEACut_C1
0097     0.0100547  ,  # absPFHCalClusIsoWithEACut_C2
0098     0.00005783    # absPFHCalClusIsoWithEACut_C3
0099     )
0100 
0101 WP_Tight_EE = WorkingPoint_V3(
0102     idName     ,  # idName
0103     0.02687    ,  # full5x5_SigmaIEtaIEtaCut
0104     0.0025426  ,  # hOverECutWithEA
0105 # Isolation cuts are generally absIso < C1 + pt*C2, except for HCalClus is < C1 + pt*C2 + pt*pt*C3
0106     0.29266    ,  # absPFChgHadIsoWithEACut_C1
0107     0.0        ,  # absPFChgHadIsoWithEACut_C2
0108     1.04269    ,  # absPFECalClusIsoWithEACut_C1
0109     0.00019549 ,  # absPFECalClusIsoWithEACut_C2
0110     0.029262   ,  # absPFHCalClusIsowithEACut_C1
0111     0.01170    ,  # absPFHCalClusIsoWithEACut_C2
0112     0.00007476    # absPFHCalClusIsoWithEACut_C3
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/RunIII_Winter22/effectiveArea_ChgHadronIso_95percentBased.txt",
0123     # neuHadIsolationMapName
0124     'photonIDValueMapProducer:phoNeutralHadronIsolation' ,
0125     # neuHadIsolationEffAreas
0126     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_NeuHadronIso_95percentBased.txt" ,
0127     # phoIsolationMapName
0128     'photonIDValueMapProducer:phoPhotonIsolation' ,
0129     # phoIsolationEffAreas
0130     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_PhotonIso_95percentBased.txt"
0131 )
0132 
0133 clusterIsoInputs = ClusterIsolationCutInputs(
0134     # trkIsolationMapName
0135     'photonIDValueMapProducer:phoTrkIsolation' ,
0136     # trkIsolationEffAreas
0137     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_TrackerIso_95percentBased.txt",
0138     # ecalClusIsolationMapName
0139     'photonIDValueMapProducer:phoEcalPFClIsolation' ,
0140     # ecalClusIsolationEffAreas
0141     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_ECalClusterIso_95percentBased.txt",
0142     # hcalClusIsolationMapName
0143     'photonIDValueMapProducer:phoHcalPFClIsolation' ,
0144     # hcalClusIsolationEffAreas
0145     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_HCalClusterIso_95percentBased.txt"
0146 )
0147 
0148 hOverEInputs = HoverECutInputs(
0149     # hOverEEffAreas
0150     "RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_coneBasedHoverE_95percentBased.txt"
0151 )
0152 
0153 #
0154 # Finally, set up VID configuration for all cuts
0155 #
0156 cutBasedPhotonID_RunIIIWinter22_122X_V1_loose  = configureVIDCutBasedPhoID_V6 ( WP_Loose_EB, WP_Loose_EE, isoInputs, clusterIsoInputs, hOverEInputs)
0157 cutBasedPhotonID_RunIIIWinter22_122X_V1_medium = configureVIDCutBasedPhoID_V6 ( WP_Medium_EB, WP_Medium_EE, isoInputs, clusterIsoInputs, hOverEInputs)
0158 cutBasedPhotonID_RunIIIWinter22_122X_V1_tight  = configureVIDCutBasedPhoID_V6 ( WP_Tight_EB, WP_Tight_EE, isoInputs, clusterIsoInputs, hOverEInputs)
0159 
0160 ## The MD5 sum numbers below reflect the exact set of cut variables
0161 # and values above. If anything changes, one has to
0162 # 1) comment out the lines below about the registry,
0163 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0164 # 3) update the MD5 sum strings below and uncomment the lines again.
0165 #
0166 
0167 central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_loose.idName,
0168                              '57d3fe8d9a1bff37aca5d13887138607233af1b5')
0169 central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_medium.idName,
0170                              '114b047ad28e2aae54869847420514d74f2540b8')
0171 central_id_registry.register(cutBasedPhotonID_RunIIIWinter22_122X_V1_tight.idName,
0172                              '2e56bbbca90e9bc089e5a716412cc51f3de47cb3')
0173 
0174 cutBasedPhotonID_RunIIIWinter22_122X_V1_loose.isPOGApproved = cms.untracked.bool(True)
0175 cutBasedPhotonID_RunIIIWinter22_122X_V1_medium.isPOGApproved = cms.untracked.bool(True)
0176 cutBasedPhotonID_RunIIIWinter22_122X_V1_tight.isPOGApproved = cms.untracked.bool(True)
0177