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_V5,
0008              configureVIDCutBasedEleID_V5 )
0009 
0010 #
0011 # The ID cuts below are optimized IDs on Fall17 simulation with 94X-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/697079/ 
0018 #
0019 #
0020 
0021 # Veto working point Barrel and Endcap
0022 #V2 of IDs good for Moriond 18
0023 idName = "cutBasedElectronID-Fall17-94X-V2-veto"
0024 WP_Veto_EB = EleWorkingPoint_V5(
0025     idName                         = idName  , # idName
0026     full5x5_sigmaIEtaIEtaCut       = 0.0126  , # full5x5_sigmaIEtaIEtaCut
0027     dEtaInSeedCut                  = 0.00463 , # dEtaInSeedCut
0028     dPhiInCut                      = 0.148   , # dPhiInCut
0029     hOverECut_C0                   = 0.05    , # hOverECut
0030     hOverECut_CE                   = 1.16    ,
0031     hOverECut_Cr                   = 0.0324  ,
0032     relCombIsolationWithEACut_C0   = 0.198   , # relCombIsolationWithEACut
0033     relCombIsolationWithEACut_Cpt  = 0.506   ,
0034     absEInverseMinusPInverseCut    = 0.209   , # absEInverseMinusPInverseCut
0035     # conversion veto cut needs no parameters, so not mentioned
0036     missingHitsCut                 = 2          # missingHitsCut
0037     )
0038 
0039 WP_Veto_EE = EleWorkingPoint_V5(
0040     idName                         = idName  , # idName
0041     full5x5_sigmaIEtaIEtaCut       = 0.0457  , # full5x5_sigmaIEtaIEtaCut
0042     dEtaInSeedCut                  = 0.00814 , # dEtaInSeedCut
0043     dPhiInCut                      = 0.19    , # dPhiInCut
0044     hOverECut_C0                   = 0.05    , # hOverECut
0045     hOverECut_CE                   = 2.54    ,
0046     hOverECut_Cr                   = 0.183   ,
0047     relCombIsolationWithEACut_C0   = 0.203   , # relCombIsolationWithEACut
0048     relCombIsolationWithEACut_Cpt  = 0.963   ,
0049     absEInverseMinusPInverseCut    = 0.132   , # absEInverseMinusPInverseCut
0050     # conversion veto cut needs no parameters, so not mentioned
0051     missingHitsCut                 = 3          # missingHitsCut
0052     )
0053 
0054 # Loose working point Barrel and Endcap
0055 idName = "cutBasedElectronID-Fall17-94X-V2-loose"
0056 WP_Loose_EB = EleWorkingPoint_V5(
0057     idName                         = idName  , # idName
0058     full5x5_sigmaIEtaIEtaCut       = 0.0112  , # full5x5_sigmaIEtaIEtaCut
0059     dEtaInSeedCut                  = 0.00377 , # dEtaInSeedCut
0060     dPhiInCut                      = 0.0884  , # dPhiInCut
0061     hOverECut_C0                   = 0.05    , # hOverECut
0062     hOverECut_CE                   = 1.16    ,
0063     hOverECut_Cr                   = 0.0324  ,
0064     relCombIsolationWithEACut_C0   = 0.112   , # relCombIsolationWithEACut
0065     relCombIsolationWithEACut_Cpt  = 0.506   ,
0066     absEInverseMinusPInverseCut    = 0.193   , # absEInverseMinusPInverseCut
0067     # conversion veto cut needs no parameters, so not mentioned
0068     missingHitsCut                 = 1          # missingHitsCut
0069     )
0070 
0071 WP_Loose_EE = EleWorkingPoint_V5(
0072     idName                         = idName  , # idName
0073     full5x5_sigmaIEtaIEtaCut       = 0.0425  , # full5x5_sigmaIEtaIEtaCut
0074     dEtaInSeedCut                  = 0.00674 , # dEtaInSeedCut
0075     dPhiInCut                      = 0.169   , # dPhiInCut
0076     hOverECut_C0                   = 0.0441  , # hOverECut
0077     hOverECut_CE                   = 2.54    ,
0078     hOverECut_Cr                   = 0.183   ,
0079     relCombIsolationWithEACut_C0   = 0.108   , # relCombIsolationWithEACut
0080     relCombIsolationWithEACut_Cpt  = 0.963   ,
0081     absEInverseMinusPInverseCut    = 0.111   , # absEInverseMinusPInverseCut
0082     # conversion veto cut needs no parameters, so not mentioned
0083     missingHitsCut                 = 1         # missingHitsCut
0084     )
0085 
0086 # Medium working point Barrel and Endcap
0087 idName = "cutBasedElectronID-Fall17-94X-V2-medium"
0088 WP_Medium_EB = EleWorkingPoint_V5(
0089     idName                         = idName  , # idName
0090     full5x5_sigmaIEtaIEtaCut       = 0.0106  , # full5x5_sigmaIEtaIEtaCut
0091     dEtaInSeedCut                  = 0.0032  , # dEtaInSeedCut
0092     dPhiInCut                      = 0.0547  , # dPhiInCut
0093     hOverECut_C0                   = 0.046   , # hOverECut
0094     hOverECut_CE                   = 1.16    ,
0095     hOverECut_Cr                   = 0.0324  ,
0096     relCombIsolationWithEACut_C0   = 0.0478  , # relCombIsolationWithEACut
0097     relCombIsolationWithEACut_Cpt  = 0.506   ,
0098     absEInverseMinusPInverseCut    = 0.184   , # absEInverseMinusPInverseCut
0099     # conversion veto cut needs no parameters, so not mentioned
0100     missingHitsCut                 = 1          # missingHitsCut
0101     )
0102 
0103 WP_Medium_EE = EleWorkingPoint_V5(
0104     idName                         = idName  , # idName
0105     full5x5_sigmaIEtaIEtaCut       = 0.0387  , # full5x5_sigmaIEtaIEtaCut
0106     dEtaInSeedCut                  = 0.00632 , # dEtaInSeedCut
0107     dPhiInCut                      = 0.0394  , # dPhiInCut
0108     hOverECut_C0                   = 0.0275  , # hOverECut
0109     hOverECut_CE                   = 2.52    ,
0110     hOverECut_Cr                   = 0.183   ,
0111     relCombIsolationWithEACut_C0   = 0.0658  , # relCombIsolationWithEACut
0112     relCombIsolationWithEACut_Cpt  = 0.963   ,
0113     absEInverseMinusPInverseCut    = 0.0721  , # absEInverseMinusPInverseCut
0114     # conversion veto cut needs no parameters, so not mentioned
0115     missingHitsCut                 = 1          # missingHitsCut
0116     )
0117 
0118 # Tight working point Barrel and Endcap
0119 idName = "cutBasedElectronID-Fall17-94X-V2-tight"
0120 WP_Tight_EB = EleWorkingPoint_V5(
0121     idName                         = idName  , # idName
0122     full5x5_sigmaIEtaIEtaCut       = 0.0104  , # full5x5_sigmaIEtaIEtaCut
0123     dEtaInSeedCut                  = 0.00255 , # dEtaInSeedCut
0124     dPhiInCut                      = 0.022   , # dPhiInCut
0125     hOverECut_C0                   = 0.026   , # hOverECut
0126     hOverECut_CE                   = 1.15    ,
0127     hOverECut_Cr                   = 0.0324  ,
0128     relCombIsolationWithEACut_C0   = 0.0287  , # relCombIsolationWithEACut
0129     relCombIsolationWithEACut_Cpt  = 0.506   ,
0130     absEInverseMinusPInverseCut    = 0.159   , # absEInverseMinusPInverseCut
0131     # conversion veto cut needs no parameters, so not mentioned
0132     missingHitsCut                 = 1          # missingHitsCut
0133     )
0134 
0135 WP_Tight_EE = EleWorkingPoint_V5(
0136     idName                         = idName  , # idName
0137     full5x5_sigmaIEtaIEtaCut       = 0.0353  , # full5x5_sigmaIEtaIEtaCut
0138     dEtaInSeedCut                  = 0.00501 , # dEtaInSeedCut
0139     dPhiInCut                      = 0.0236  , # dPhiInCut
0140     hOverECut_C0                   = 0.0188  , # hOverECut
0141     hOverECut_CE                   = 2.06    ,
0142     hOverECut_Cr                   = 0.183   ,
0143     relCombIsolationWithEACut_C0   = 0.0445  , # relCombIsolationWithEACut
0144     relCombIsolationWithEACut_Cpt  = 0.963   ,
0145     absEInverseMinusPInverseCut    = 0.0197  , # absEInverseMinusPInverseCut
0146     # conversion veto cut needs no parameters, so not mentioned
0147     missingHitsCut                 = 1          # missingHitsCut
0148     )
0149 
0150 # Second, define what effective areas to use for pile-up correction
0151 isoEffAreas = "RecoEgamma/ElectronIdentification/data/Fall17/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_94X.txt"
0152 
0153 #
0154 # Set up VID configuration for all cuts and working points
0155 #
0156 
0157 cutBasedElectronID_Fall17_94X_V2_veto   = configureVIDCutBasedEleID_V5(WP_Veto_EB,   WP_Veto_EE, isoEffAreas)
0158 cutBasedElectronID_Fall17_94X_V2_loose  = configureVIDCutBasedEleID_V5(WP_Loose_EB,  WP_Loose_EE, isoEffAreas)
0159 cutBasedElectronID_Fall17_94X_V2_medium = configureVIDCutBasedEleID_V5(WP_Medium_EB, WP_Medium_EE, isoEffAreas)
0160 cutBasedElectronID_Fall17_94X_V2_tight  = configureVIDCutBasedEleID_V5(WP_Tight_EB,  WP_Tight_EE, isoEffAreas)
0161 
0162 # The MD5 sum numbers below reflect the exact set of cut variables
0163 # and values above. If anything changes, one has to 
0164 # 1) comment out the lines below about the registry and the isPOGApproved lines,
0165 # 2) run "calculateIdMD5 <this file name> <one of the VID config names just above>
0166 # 3) update the MD5 sum strings below and uncomment the lines again.
0167 #
0168 
0169 central_id_registry.register(cutBasedElectronID_Fall17_94X_V2_veto.idName,   '74e217e3ece16b49bd337026a29fc3e9')
0170 central_id_registry.register(cutBasedElectronID_Fall17_94X_V2_loose.idName,  '5547e2c8b5c222192519c41bff05bc2e')
0171 central_id_registry.register(cutBasedElectronID_Fall17_94X_V2_medium.idName, '48702f025a8df2c527f53927af8b66d0')
0172 central_id_registry.register(cutBasedElectronID_Fall17_94X_V2_tight.idName,  'c06761e199f084f5b0f7868ac48a3e19')
0173 
0174 ### for now until we have a database...
0175 cutBasedElectronID_Fall17_94X_V2_veto.isPOGApproved   = cms.untracked.bool(True)
0176 cutBasedElectronID_Fall17_94X_V2_loose.isPOGApproved  = cms.untracked.bool(True)
0177 cutBasedElectronID_Fall17_94X_V2_medium.isPOGApproved = cms.untracked.bool(True)
0178 cutBasedElectronID_Fall17_94X_V2_tight.isPOGApproved  = cms.untracked.bool(True)