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_V3,
0008              configureVIDCutBasedEleID_V3 )
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/482677/contributions/2259342/attachments/1316731/1972911/talk_electron_ID_spring16_update.pdf
0018 #
0019 # First, define cut values
0020 #
0021 
0022 # Veto working point Barrel and Endcap
0023 idName = "cutBasedElectronID-Summer16-80X-V1-veto"
0024 WP_Veto_EB = EleWorkingPoint_V3(
0025     idName                         = idName  , # idName
0026     full5x5_sigmaIEtaIEtaCut       = 0.0115  , # full5x5_sigmaIEtaIEtaCut
0027     dEtaInSeedCut                  = 0.00749 , # dEtaInSeedCut
0028     dPhiInCut                      = 0.228   , # dPhiInCut
0029     hOverECut                      = 0.356   , # hOverECut
0030     relCombIsolationWithEALowPtCut = 0.175   , # relCombIsolationWithEALowPtCut
0031     relCombIsolationWithEAHighPtCut= 0.175   , # relCombIsolationWithEAHighPtCut
0032     absEInverseMinusPInverseCut    = 0.299   , # absEInverseMinusPInverseCut
0033     # conversion veto cut needs no parameters, so not mentioned
0034     missingHitsCut                 = 2          # missingHitsCut
0035     )
0036 
0037 WP_Veto_EE = EleWorkingPoint_V3(
0038     idName                         = idName  , # idName
0039     full5x5_sigmaIEtaIEtaCut       = 0.0370  , # full5x5_sigmaIEtaIEtaCut
0040     dEtaInSeedCut                  = 0.00895 , # dEtaInSeedCut
0041     dPhiInCut                      = 0.213   , # dPhiInCut
0042     hOverECut                      = 0.211   , # hOverECut
0043     relCombIsolationWithEALowPtCut = 0.159   , # relCombIsolationWithEALowPtCut
0044     relCombIsolationWithEAHighPtCut= 0.159   , # relCombIsolationWithEAHighPtCut
0045     absEInverseMinusPInverseCut    = 0.150   , # absEInverseMinusPInverseCut
0046     # conversion veto cut needs no parameters, so not mentioned
0047     missingHitsCut                 = 3          # missingHitsCut
0048     )
0049 
0050 # Loose working point Barrel and Endcap
0051 idName = "cutBasedElectronID-Summer16-80X-V1-loose"
0052 WP_Loose_EB = EleWorkingPoint_V3(
0053     idName                         = idName  , # idName
0054     full5x5_sigmaIEtaIEtaCut       = 0.0110  , # full5x5_sigmaIEtaIEtaCut
0055     dEtaInSeedCut                  = 0.00477 , # dEtaInSeedCut
0056     dPhiInCut                      = 0.222   , # dPhiInCut
0057     hOverECut                      = 0.298   , # hOverECut
0058     relCombIsolationWithEALowPtCut = 0.0994  , # relCombIsolationWithEALowPtCut
0059     relCombIsolationWithEAHighPtCut= 0.0994  , # relCombIsolationWithEAHighPtCut
0060     absEInverseMinusPInverseCut    = 0.241   , # absEInverseMinusPInverseCut
0061     # conversion veto cut needs no parameters, so not mentioned
0062     missingHitsCut                 = 1          # missingHitsCut
0063     )
0064 
0065 WP_Loose_EE = EleWorkingPoint_V3(
0066     idName                         = idName  , # idName
0067     full5x5_sigmaIEtaIEtaCut       = 0.0314  , # full5x5_sigmaIEtaIEtaCut
0068     dEtaInSeedCut                  = 0.00868 , # dEtaInSeedCut
0069     dPhiInCut                      = 0.213   , # dPhiInCut
0070     hOverECut                      = 0.101   , # hOverECut
0071     relCombIsolationWithEALowPtCut = 0.107   , # relCombIsolationWithEALowPtCut
0072     relCombIsolationWithEAHighPtCut= 0.107   , # relCombIsolationWithEAHighPtCut
0073     absEInverseMinusPInverseCut    = 0.140   , # absEInverseMinusPInverseCut
0074     # conversion veto cut needs no parameters, so not mentioned
0075     missingHitsCut                 = 1         # missingHitsCut
0076     )
0077 
0078 # Medium working point Barrel and Endcap
0079 idName = "cutBasedElectronID-Summer16-80X-V1-medium"
0080 WP_Medium_EB = EleWorkingPoint_V3(
0081     idName                         = idName , # idName
0082     full5x5_sigmaIEtaIEtaCut       = 0.00998, # full5x5_sigmaIEtaIEtaCut
0083     dEtaInSeedCut                  = 0.00311, # dEtaInSeedCut
0084     dPhiInCut                      = 0.103  , # dPhiInCut
0085     hOverECut                      = 0.253  , # hOverECut
0086     relCombIsolationWithEALowPtCut = 0.0695 , # relCombIsolationWithEALowPtCut
0087     relCombIsolationWithEAHighPtCut= 0.0695 , # relCombIsolationWithEAHighPtCut
0088     absEInverseMinusPInverseCut    = 0.134  , # absEInverseMinusPInverseCut
0089     # conversion veto cut needs no parameters, so not mentioned
0090     missingHitsCut                 = 1          # missingHitsCut
0091     )
0092 
0093 WP_Medium_EE = EleWorkingPoint_V3(
0094     idName                         = idName  , # idName
0095     full5x5_sigmaIEtaIEtaCut       = 0.0298  , # full5x5_sigmaIEtaIEtaCut
0096     dEtaInSeedCut                  = 0.00609 , # dEtaInSeedCut
0097     dPhiInCut                      = 0.0450  , # dPhiInCut
0098     hOverECut                      = 0.0878  , # hOverECut
0099     relCombIsolationWithEALowPtCut = 0.0821  , # relCombIsolationWithEALowPtCut
0100     relCombIsolationWithEAHighPtCut= 0.0821  , # relCombIsolationWithEAHighPtCut
0101     absEInverseMinusPInverseCut    = 0.130   , # absEInverseMinusPInverseCut
0102     # conversion veto cut needs no parameters, so not mentioned
0103     missingHitsCut                 = 1          # missingHitsCut
0104     )
0105 
0106 # Tight working point Barrel and Endcap
0107 idName = "cutBasedElectronID-Summer16-80X-V1-tight"
0108 WP_Tight_EB = EleWorkingPoint_V3(
0109     idName                         = idName    , # idName
0110     full5x5_sigmaIEtaIEtaCut       = 0.00998   , # full5x5_sigmaIEtaIEtaCut
0111     dEtaInSeedCut                  = 0.00308   , # dEtaInSeedCut
0112     dPhiInCut                      = 0.0816    , # dPhiInCut
0113     hOverECut                      = 0.0414    , # hOverECut
0114     relCombIsolationWithEALowPtCut = 0.0588    , # relCombIsolationWithEALowPtCut
0115     relCombIsolationWithEAHighPtCut= 0.0588    , # relCombIsolationWithEAHighPtCut
0116     absEInverseMinusPInverseCut    = 0.0129    , # absEInverseMinusPInverseCut
0117     # conversion veto cut needs no parameters, so not mentioned
0118     missingHitsCut                 = 1          # missingHitsCut
0119     )
0120 
0121 WP_Tight_EE = EleWorkingPoint_V3(
0122     idName                         = idName  , # idName
0123     full5x5_sigmaIEtaIEtaCut       = 0.0292  , # full5x5_sigmaIEtaIEtaCut
0124     dEtaInSeedCut                  = 0.00605 , # dEtaInSeedCut
0125     dPhiInCut                      = 0.0394  , # dPhiInCut
0126     hOverECut                      = 0.0641  , # hOverECut
0127     relCombIsolationWithEALowPtCut = 0.0571  , # relCombIsolationWithEALowPtCut
0128     relCombIsolationWithEAHighPtCut= 0.0571  , # relCombIsolationWithEAHighPtCut
0129     absEInverseMinusPInverseCut    = 0.0129 , # absEInverseMinusPInverseCut
0130     # conversion veto cut needs no parameters, so not mentioned
0131     missingHitsCut                 = 1          # missingHitsCut
0132     )
0133 
0134 # Second, define what effective areas to use for pile-up correction
0135 isoEffAreas = "RecoEgamma/ElectronIdentification/data/Summer16/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_80X.txt"
0136 
0137 
0138 #
0139 # Set up VID configuration for all cuts and working points
0140 #
0141 
0142 cutBasedElectronID_Summer16_80X_V1_veto = configureVIDCutBasedEleID_V3(WP_Veto_EB, WP_Veto_EE, isoEffAreas)
0143 cutBasedElectronID_Summer16_80X_V1_loose = configureVIDCutBasedEleID_V3(WP_Loose_EB, WP_Loose_EE, isoEffAreas)
0144 cutBasedElectronID_Summer16_80X_V1_medium = configureVIDCutBasedEleID_V3(WP_Medium_EB, WP_Medium_EE, isoEffAreas)
0145 cutBasedElectronID_Summer16_80X_V1_tight = configureVIDCutBasedEleID_V3(WP_Tight_EB, WP_Tight_EE, isoEffAreas)
0146 
0147 
0148 # The MD5 sum numbers below reflect the exact set of cut variables
0149 # and values above. If anything changes, one has to 
0150 # 1) comment out the lines below about the registry, 
0151 # 2) run "calculateMD5 <this file name> <one of the VID config names just above>
0152 # 3) update the MD5 sum strings below and uncomment the lines again.
0153 #
0154 
0155 central_id_registry.register(cutBasedElectronID_Summer16_80X_V1_veto.idName,
0156                              '0025c1841da1ab64a08d703ded72409b')
0157 central_id_registry.register(cutBasedElectronID_Summer16_80X_V1_loose.idName,
0158                              'c1c4c739f1ba0791d40168c123183475')
0159 central_id_registry.register(cutBasedElectronID_Summer16_80X_V1_medium.idName,
0160                              '71b43f74a27d2fd3d27416afd22e8692')
0161 central_id_registry.register(cutBasedElectronID_Summer16_80X_V1_tight.idName,
0162                              'ca2a9db2976d80ba2c13f9bfccdc32f2')
0163 
0164 
0165 ### for now until we have a database...
0166 cutBasedElectronID_Summer16_80X_V1_veto.isPOGApproved = cms.untracked.bool(True)
0167 cutBasedElectronID_Summer16_80X_V1_loose.isPOGApproved = cms.untracked.bool(True)
0168 cutBasedElectronID_Summer16_80X_V1_medium.isPOGApproved = cms.untracked.bool(True)
0169 cutBasedElectronID_Summer16_80X_V1_tight.isPOGApproved = cms.untracked.bool(True)