Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:26

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.ElectronIdentification.Identification.cutBasedElectronID_tools \
0007     import ( EleWorkingPoint_V4,
0008              configureVIDCutBasedEleID_V4 )
0009 
0010 #
0011 # The ID cuts below are optimized IDs on Spring16 simulation with 80X-based production
0012 # The cut values are taken from the twiki:
0013 #       https://twiki.cern.ch/twiki/bin/view/CMS/CutBasedElectronIdentificationRun2
0014 #       (where they may not stay, if a newer version of cuts becomes available for these
0015 #        conditions)
0016 # See also the presentation explaining these working points (this will not change):
0017 # https://indico.cern.ch/event/662751/contributions/2778044/attachments/1562080/2459801/171121_egamma_workshop.pdf
0018 #
0019 # First, define cut values
0020 #
0021 
0022 # Veto working point Barrel and Endcap
0023 #V1 of IDs good for Moriond 18
0024 idName = "cutBasedElectronID-Fall17-94X-V1-veto"
0025 WP_Veto_EB = EleWorkingPoint_V4(
0026     idName                         = idName  , # idName
0027     full5x5_sigmaIEtaIEtaCut       = 0.0128  , # full5x5_sigmaIEtaIEtaCut
0028     dEtaInSeedCut                  = 0.00523 , # dEtaInSeedCut
0029     dPhiInCut                      = 0.159   , # dPhiInCut
0030     hOverECut_C0                   = 0.05    , # hOverECut
0031     hOverECut_CE                   = 1.12    ,
0032     hOverECut_Cr                   = 0.0368  ,
0033     relCombIsolationWithEALowPtCut = 0.168   , # relCombIsolationWithEALowPtCut
0034     relCombIsolationWithEAHighPtCut= 0.168   , # relCombIsolationWithEAHighPtCut
0035     absEInverseMinusPInverseCut    = 0.193   , # absEInverseMinusPInverseCut
0036     # conversion veto cut needs no parameters, so not mentioned
0037     missingHitsCut                 = 2          # missingHitsCut
0038     )
0039 
0040 WP_Veto_EE = EleWorkingPoint_V4(
0041     idName                         = idName  , # idName
0042     full5x5_sigmaIEtaIEtaCut       = 0.0445  , # full5x5_sigmaIEtaIEtaCut
0043     dEtaInSeedCut                  = 0.00984 , # dEtaInSeedCut
0044     dPhiInCut                      = 0.157   , # dPhiInCut
0045     hOverECut_C0                   = 0.05    , # hOverECut
0046     hOverECut_CE                   = 0.5     ,
0047     hOverECut_Cr                   = 0.201   ,
0048     relCombIsolationWithEALowPtCut = 0.185   , # relCombIsolationWithEALowPtCut
0049     relCombIsolationWithEAHighPtCut= 0.185   , # relCombIsolationWithEAHighPtCut
0050     absEInverseMinusPInverseCut    = 0.0962   , # absEInverseMinusPInverseCut
0051     # conversion veto cut needs no parameters, so not mentioned
0052     missingHitsCut                 = 3          # missingHitsCut
0053     )
0054 
0055 # Loose working point Barrel and Endcap
0056 idName = "cutBasedElectronID-Fall17-94X-V1-loose"
0057 WP_Loose_EB = EleWorkingPoint_V4(
0058     idName                         = idName  , # idName
0059     full5x5_sigmaIEtaIEtaCut       = 0.0105  , # full5x5_sigmaIEtaIEtaCut
0060     dEtaInSeedCut                  = 0.00387 , # dEtaInSeedCut
0061     dPhiInCut                      = 0.0716   , # dPhiInCut
0062     hOverECut_C0                   = 0.05    , # hOverECut
0063     hOverECut_CE                   = 1.12    ,
0064     hOverECut_Cr                   = 0.0368  ,
0065     relCombIsolationWithEALowPtCut = 0.133  , # relCombIsolationWithEALowPtCut
0066     relCombIsolationWithEAHighPtCut= 0.133  , # relCombIsolationWithEAHighPtCut
0067     absEInverseMinusPInverseCut    = 0.129   , # absEInverseMinusPInverseCut
0068     # conversion veto cut needs no parameters, so not mentioned
0069     missingHitsCut                 = 1          # missingHitsCut
0070     )
0071 
0072 WP_Loose_EE = EleWorkingPoint_V4(
0073     idName                         = idName  , # idName
0074     full5x5_sigmaIEtaIEtaCut       = 0.0356  , # full5x5_sigmaIEtaIEtaCut
0075     dEtaInSeedCut                  = 0.0072 , # dEtaInSeedCut
0076     dPhiInCut                      = 0.147   , # dPhiInCut
0077     hOverECut_C0                   = 0.0414  , # hOverECut
0078     hOverECut_CE                   = 0.5     ,
0079     hOverECut_Cr                   = 0.201   ,
0080     relCombIsolationWithEALowPtCut = 0.146   , # relCombIsolationWithEALowPtCut
0081     relCombIsolationWithEAHighPtCut= 0.146   , # relCombIsolationWithEAHighPtCut
0082     absEInverseMinusPInverseCut    = 0.0875   , # absEInverseMinusPInverseCut
0083     # conversion veto cut needs no parameters, so not mentioned
0084     missingHitsCut                 = 1         # missingHitsCut
0085     )
0086 
0087 # Medium working point Barrel and Endcap
0088 idName = "cutBasedElectronID-Fall17-94X-V1-medium"
0089 WP_Medium_EB = EleWorkingPoint_V4(
0090     idName                         = idName , # idName
0091     full5x5_sigmaIEtaIEtaCut       = 0.0105, # full5x5_sigmaIEtaIEtaCut
0092     dEtaInSeedCut                  = 0.00365, # dEtaInSeedCut
0093     dPhiInCut                      = 0.0588  , # dPhiInCut
0094     hOverECut_C0                   = 0.026   , # hOverECut
0095     hOverECut_CE                   = 1.12    ,
0096     hOverECut_Cr                   = 0.0368  ,
0097     relCombIsolationWithEALowPtCut = 0.0718 , # relCombIsolationWithEALowPtCut
0098     relCombIsolationWithEAHighPtCut= 0.0718 , # relCombIsolationWithEAHighPtCut
0099     absEInverseMinusPInverseCut    = 0.0327  , # absEInverseMinusPInverseCut
0100     # conversion veto cut needs no parameters, so not mentioned
0101     missingHitsCut                 = 1          # missingHitsCut
0102     )
0103 
0104 WP_Medium_EE = EleWorkingPoint_V4(
0105     idName                         = idName  , # idName
0106     full5x5_sigmaIEtaIEtaCut       = 0.0309  , # full5x5_sigmaIEtaIEtaCut
0107     dEtaInSeedCut                  = 0.00625 , # dEtaInSeedCut
0108     dPhiInCut                      = 0.0355  , # dPhiInCut
0109     hOverECut_C0                   = 0.026    , # hOverECut
0110     hOverECut_CE                   = 0.5     ,
0111     hOverECut_Cr                   = 0.201   ,
0112     relCombIsolationWithEALowPtCut = 0.143  , # relCombIsolationWithEALowPtCut
0113     relCombIsolationWithEAHighPtCut= 0.143  , # relCombIsolationWithEAHighPtCut
0114     absEInverseMinusPInverseCut    = 0.0335   , # absEInverseMinusPInverseCut
0115     # conversion veto cut needs no parameters, so not mentioned
0116     missingHitsCut                 = 1          # missingHitsCut
0117     )
0118 
0119 # Tight working point Barrel and Endcap
0120 idName = "cutBasedElectronID-Fall17-94X-V1-tight"
0121 WP_Tight_EB = EleWorkingPoint_V4(
0122     idName                         = idName    , # idName
0123     full5x5_sigmaIEtaIEtaCut       = 0.0104   , # full5x5_sigmaIEtaIEtaCut
0124     dEtaInSeedCut                  = 0.00353   , # dEtaInSeedCut
0125     dPhiInCut                      = 0.0499    , # dPhiInCut
0126     hOverECut_C0                   = 0.026   , # hOverECut
0127     hOverECut_CE                   = 1.12    ,
0128     hOverECut_Cr                   = 0.0368  ,
0129     relCombIsolationWithEALowPtCut = 0.0361    , # relCombIsolationWithEALowPtCut
0130     relCombIsolationWithEAHighPtCut= 0.0361    , # relCombIsolationWithEAHighPtCut
0131     absEInverseMinusPInverseCut    = 0.0278    , # absEInverseMinusPInverseCut
0132     # conversion veto cut needs no parameters, so not mentioned
0133     missingHitsCut                 = 1          # missingHitsCut
0134     )
0135 
0136 WP_Tight_EE = EleWorkingPoint_V4(
0137     idName                         = idName  , # idName
0138     full5x5_sigmaIEtaIEtaCut       = 0.0305  , # full5x5_sigmaIEtaIEtaCut
0139     dEtaInSeedCut                  = 0.00567 , # dEtaInSeedCut
0140     dPhiInCut                      = 0.0165  , # dPhiInCut
0141     hOverECut_C0                   = 0.026   , # hOverECut
0142     hOverECut_CE                   = 0.5     ,
0143     hOverECut_Cr                   = 0.201   ,
0144     relCombIsolationWithEALowPtCut = 0.094  , # relCombIsolationWithEALowPtCut
0145     relCombIsolationWithEAHighPtCut= 0.094  , # relCombIsolationWithEAHighPtCut
0146     absEInverseMinusPInverseCut    = 0.0158 , # absEInverseMinusPInverseCut
0147     # conversion veto cut needs no parameters, so not mentioned
0148     missingHitsCut                 = 1          # missingHitsCut
0149     )
0150 
0151 # Second, define what effective areas to use for pile-up correction
0152 isoEffAreas = "RecoEgamma/ElectronIdentification/data/Fall17/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_92X.txt"
0153 
0154 
0155 #
0156 # Set up VID configuration for all cuts and working points
0157 #
0158 
0159 cutBasedElectronID_Fall17_94X_V1_veto = configureVIDCutBasedEleID_V4(WP_Veto_EB, WP_Veto_EE, isoEffAreas)
0160 cutBasedElectronID_Fall17_94X_V1_loose = configureVIDCutBasedEleID_V4(WP_Loose_EB, WP_Loose_EE, isoEffAreas)
0161 cutBasedElectronID_Fall17_94X_V1_medium = configureVIDCutBasedEleID_V4(WP_Medium_EB, WP_Medium_EE, isoEffAreas)
0162 cutBasedElectronID_Fall17_94X_V1_tight = configureVIDCutBasedEleID_V4(WP_Tight_EB, WP_Tight_EE, isoEffAreas)
0163 
0164 
0165 # The MD5 sum numbers below reflect the exact set of cut variables
0166 # and values above. If anything changes, one has to 
0167 # 1) comment out the lines below about the registry, 
0168 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0169 # 3) update the MD5 sum strings below and uncomment the lines again.
0170 #
0171 
0172 central_id_registry.register(cutBasedElectronID_Fall17_94X_V1_veto.idName,
0173                              '43be9b381a8d9b0910b7f81a5ad8ff3a')
0174 central_id_registry.register(cutBasedElectronID_Fall17_94X_V1_loose.idName,
0175                              '0b8456d622494441fe713a6858e0f7c1')
0176 central_id_registry.register(cutBasedElectronID_Fall17_94X_V1_medium.idName,
0177                              'a238ee70910de53d36866e89768500e9')
0178 central_id_registry.register(cutBasedElectronID_Fall17_94X_V1_tight.idName,
0179                              '4acb2d2796efde7fba75380ce8823fc2')
0180 
0181 
0182 ### for now until we have a database...
0183 cutBasedElectronID_Fall17_94X_V1_veto.isPOGApproved = cms.untracked.bool(True)
0184 cutBasedElectronID_Fall17_94X_V1_loose.isPOGApproved = cms.untracked.bool(True)
0185 cutBasedElectronID_Fall17_94X_V1_medium.isPOGApproved = cms.untracked.bool(True)
0186 cutBasedElectronID_Fall17_94X_V1_tight.isPOGApproved = cms.untracked.bool(True)