File indexing completed on 2024-04-06 12:25:08
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 ebMax = 1.4442
0005 eeMin = 1.566
0006 ebCutOff=1.479
0007
0008
0009
0010
0011
0012
0013 class HEEP_WorkingPoint_V1:
0014 """
0015 This is a container class to hold numerical cut values for either
0016 the barrel or endcap set of cuts
0017 """
0018 def __init__(self,
0019 idName,
0020 dEtaInSeedCut,
0021 dPhiInCut,
0022 full5x5SigmaIEtaIEtaCut,
0023
0024 minE1x5OverE5x5Cut,
0025 minE2x5OverE5x5Cut,
0026
0027
0028
0029 hOverESlopeTerm,
0030 hOverESlopeStart,
0031 hOverEConstTerm,
0032
0033
0034
0035 trkIsoSlopeTerm,
0036 trkIsoSlopeStart,
0037 trkIsoConstTerm,
0038
0039
0040
0041
0042 ehIsoSlopeTerm,
0043 ehIsoSlopeStart,
0044 ehIsoConstTerm,
0045 effAreaForEHIso,
0046
0047 dxyCut,
0048 maxMissingHitsCut,
0049 ecalDrivenCut
0050 ):
0051
0052 self.idName = idName
0053 self.dEtaInSeedCut = dEtaInSeedCut
0054 self.dPhiInCut = dPhiInCut
0055 self.full5x5SigmaIEtaIEtaCut = full5x5SigmaIEtaIEtaCut
0056 self.minE1x5OverE5x5Cut = minE1x5OverE5x5Cut
0057 self.minE2x5OverE5x5Cut = minE2x5OverE5x5Cut
0058 self.hOverESlopeTerm = hOverESlopeTerm
0059 self.hOverESlopeStart = hOverESlopeStart
0060 self.hOverEConstTerm = hOverEConstTerm
0061 self.trkIsoSlopeTerm = trkIsoSlopeTerm
0062 self.trkIsoSlopeStart = trkIsoSlopeStart
0063 self.trkIsoConstTerm = trkIsoConstTerm
0064 self.ehIsoSlopeTerm = ehIsoSlopeTerm
0065 self.ehIsoSlopeStart = ehIsoSlopeStart
0066 self.ehIsoConstTerm = ehIsoConstTerm
0067 self.effAreaForEHIso = effAreaForEHIso
0068 self.dxyCut = dxyCut
0069 self.maxMissingHitsCut = maxMissingHitsCut
0070 self.ecalDrivenCut = ecalDrivenCut
0071
0072 class HEEP_WorkingPoint_V2:
0073 """
0074 This is a container class to hold numerical cut values for either
0075 the barrel or endcap set of cuts
0076 """
0077 def __init__(self,
0078 idName,
0079 dEtaInSeedCut,
0080 dPhiInCut,
0081 full5x5SigmaIEtaIEtaCut,
0082
0083 minE1x5OverE5x5Cut,
0084 minE2x5OverE5x5Cut,
0085
0086
0087
0088 hOverESlopeTerm,
0089 hOverESlopeStart,
0090 hOverEConstTerm,
0091
0092
0093
0094 trkIsoSlopeTerm,
0095 trkIsoSlopeStart,
0096 trkIsoConstTerm,
0097 trkIsoRhoCorrStart,
0098 trkIsoEffArea,
0099
0100
0101
0102
0103 ehIsoSlopeTerm,
0104 ehIsoSlopeStart,
0105 ehIsoConstTerm,
0106 effAreaForEHIso,
0107
0108 dxyCut,
0109 maxMissingHitsCut,
0110 ecalDrivenCut
0111 ):
0112
0113 self.idName = idName
0114 self.dEtaInSeedCut = dEtaInSeedCut
0115 self.dPhiInCut = dPhiInCut
0116 self.full5x5SigmaIEtaIEtaCut = full5x5SigmaIEtaIEtaCut
0117 self.minE1x5OverE5x5Cut = minE1x5OverE5x5Cut
0118 self.minE2x5OverE5x5Cut = minE2x5OverE5x5Cut
0119 self.hOverESlopeTerm = hOverESlopeTerm
0120 self.hOverESlopeStart = hOverESlopeStart
0121 self.hOverEConstTerm = hOverEConstTerm
0122 self.trkIsoSlopeTerm = trkIsoSlopeTerm
0123 self.trkIsoSlopeStart = trkIsoSlopeStart
0124 self.trkIsoConstTerm = trkIsoConstTerm
0125 self.trkIsoRhoCorrStart = trkIsoRhoCorrStart
0126 self.trkIsoEffArea = trkIsoEffArea
0127 self.ehIsoSlopeTerm = ehIsoSlopeTerm
0128 self.ehIsoSlopeStart = ehIsoSlopeStart
0129 self.ehIsoConstTerm = ehIsoConstTerm
0130 self.effAreaForEHIso = effAreaForEHIso
0131 self.dxyCut = dxyCut
0132 self.maxMissingHitsCut = maxMissingHitsCut
0133 self.ecalDrivenCut = ecalDrivenCut
0134
0135
0136
0137
0138
0139 def psetMinPtCut(cutValue=35.):
0140 return cms.PSet(
0141 cutName = cms.string("MinPtCut"),
0142 minPt = cms.double(cutValue),
0143 needsAdditionalProducts = cms.bool(False),
0144 isIgnored = cms.bool(False)
0145 )
0146
0147
0148 def psetMinEcalEtCut(cutValue=5.):
0149 return cms.PSet(
0150 cutName = cms.string("GsfEleMinEcalEtCut"),
0151 minEt = cms.double(cutValue),
0152 needsAdditionalProducts = cms.bool(False),
0153 isIgnored = cms.bool(False)
0154 )
0155
0156
0157 def psetGsfEleSCEtaMultiRangeCut():
0158 return cms.PSet(
0159 cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
0160 useAbsEta = cms.bool(True),
0161 allowedEtaRanges = cms.VPSet(
0162 cms.PSet( minEta = cms.double(0.0),
0163 maxEta = cms.double(ebMax) ),
0164 cms.PSet( minEta = cms.double(eeMin),
0165 maxEta = cms.double(2.5) )
0166 ),
0167 needsAdditionalProducts = cms.bool(False),
0168 isIgnored = cms.bool(False)
0169 )
0170
0171
0172 def psetGsfEleDEtaInSeedCut(wpEB, wpEE):
0173 return cms.PSet(
0174 cutName = cms.string('GsfEleEBEECut'),
0175 cutString = cms.string("abs(deltaEtaSeedClusterTrackAtVtx)"),
0176 cutValueEB = cms.double( wpEB.dEtaInSeedCut ),
0177 cutValueEE = cms.double( wpEE.dEtaInSeedCut ),
0178 needsAdditionalProducts = cms.bool(False),
0179 isIgnored = cms.bool(False)
0180 )
0181
0182
0183 def psetGsfEleDPhiInCut(wpEB, wpEE):
0184 return cms.PSet(
0185 cutName = cms.string('GsfEleEBEECut'),
0186 cutString = cms.string("abs(deltaPhiSuperClusterTrackAtVtx)"),
0187 cutValueEB = cms.double( wpEB.dPhiInCut ),
0188 cutValueEE = cms.double( wpEE.dPhiInCut ),
0189 needsAdditionalProducts = cms.bool(False),
0190 isIgnored = cms.bool(False)
0191 )
0192
0193
0194 def psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB, wpEE):
0195 return cms.PSet(
0196 cutName = cms.string('GsfEleEBEECut'),
0197 cutString = cms.string("full5x5_sigmaIetaIeta"),
0198 cutValueEB = cms.double( wpEB.full5x5SigmaIEtaIEtaCut ),
0199 cutValueEE = cms.double( wpEE.full5x5SigmaIEtaIEtaCut ),
0200 needsAdditionalProducts = cms.bool(False),
0201 isIgnored = cms.bool(False)
0202 )
0203
0204 def psetGsfEleFull5x5SigmaIEtaIEtaWithSatCut(wpEB, wpEE):
0205 return cms.PSet(
0206 cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaWithSatCut'),
0207 maxSigmaIEtaIEtaEB = cms.double( wpEB.full5x5SigmaIEtaIEtaCut ),
0208 maxSigmaIEtaIEtaEE = cms.double( wpEE.full5x5SigmaIEtaIEtaCut ),
0209 maxNrSatCrysIn5x5EB =cms.int32( 0 ),
0210 maxNrSatCrysIn5x5EE =cms.int32( 0 ),
0211 needsAdditionalProducts = cms.bool(False),
0212
0213 isIgnored = cms.bool(False)
0214 )
0215
0216 def psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB, wpEE):
0217 return cms.PSet(
0218 cutName = cms.string('GsfEleFull5x5E2x5OverE5x5Cut'),
0219
0220 minE1x5OverE5x5EB = cms.double( wpEB.minE1x5OverE5x5Cut ),
0221 minE1x5OverE5x5EE = cms.double( wpEE.minE1x5OverE5x5Cut ),
0222
0223 minE2x5OverE5x5EB = cms.double( wpEB.minE2x5OverE5x5Cut ),
0224 minE2x5OverE5x5EE = cms.double( wpEE.minE2x5OverE5x5Cut ),
0225 needsAdditionalProducts = cms.bool(False),
0226 isIgnored = cms.bool(False)
0227 )
0228
0229 def psetGsfEleFull5x5E2x5OverE5x5WithSatCut(wpEB, wpEE):
0230 return cms.PSet(
0231 cutName = cms.string('GsfEleFull5x5E2x5OverE5x5WithSatCut'),
0232
0233 minE1x5OverE5x5EB = cms.double( wpEB.minE1x5OverE5x5Cut ),
0234 minE1x5OverE5x5EE = cms.double( wpEE.minE1x5OverE5x5Cut ),
0235
0236 minE2x5OverE5x5EB = cms.double( wpEB.minE2x5OverE5x5Cut ),
0237 minE2x5OverE5x5EE = cms.double( wpEE.minE2x5OverE5x5Cut ),
0238 maxNrSatCrysIn5x5EB =cms.int32( 0 ),
0239 maxNrSatCrysIn5x5EE =cms.int32( 0 ),
0240 needsAdditionalProducts = cms.bool(False),
0241 isIgnored = cms.bool(False)
0242 )
0243
0244 def psetGsfEleHadronicOverEMLinearCut(wpEB, wpEE) :
0245 return cms.PSet(
0246 cutName = cms.string('GsfEleHadronicOverEMLinearCut'),
0247
0248
0249
0250 slopeTermEB = cms.double( wpEB.hOverESlopeTerm ),
0251 slopeTermEE = cms.double( wpEE.hOverESlopeTerm ),
0252 slopeStartEB = cms.double( wpEB.hOverESlopeStart ),
0253 slopeStartEE = cms.double( wpEE.hOverESlopeStart ),
0254 constTermEB = cms.double( wpEB.hOverEConstTerm ),
0255 constTermEE = cms.double( wpEE.hOverEConstTerm ),
0256 needsAdditionalProducts = cms.bool(False),
0257 isIgnored = cms.bool(False)
0258 )
0259
0260
0261 def psetGsfEleTrkPtIsoCut(wpEB, wpEE, useHEEPIso = False):
0262 return cms.PSet(
0263 cutName = cms.string('GsfEleTrkPtIsoCut'),
0264
0265
0266
0267 slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
0268 slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
0269 slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
0270 slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
0271 constTermEB = cms.double( wpEB.trkIsoConstTerm ),
0272 constTermEE = cms.double( wpEE.trkIsoConstTerm ),
0273 useHEEPIso = cms.bool(useHEEPIso),
0274 needsAdditionalProducts = cms.bool(False),
0275 isIgnored = cms.bool(False)
0276 )
0277
0278 def psetGsfEleTrkPtIsoRhoCut(wpEB, wpEE):
0279 return cms.PSet(
0280 cutName = cms.string('GsfEleTrkPtIsoRhoCut'),
0281
0282
0283
0284 slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
0285 slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
0286 slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
0287 slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
0288 constTermEB = cms.double( wpEB.trkIsoConstTerm ),
0289 constTermEE = cms.double( wpEE.trkIsoConstTerm ),
0290 rhoEtStartEB = cms.double( wpEB.trkIsoRhoCorrStart),
0291 rhoEtStartEE = cms.double( wpEE.trkIsoRhoCorrStart),
0292 rhoEAEB = cms.double( wpEB.trkIsoEffArea),
0293 rhoEAEE = cms.double( wpEE.trkIsoEffArea),
0294 rho = cms.InputTag("fixedGridRhoFastjetAll"),
0295 needsAdditionalProducts = cms.bool(True),
0296 isIgnored = cms.bool(False)
0297 )
0298 def psetGsfEleTrkPtNoJetCoreIsoCut(wpEB, wpEE):
0299 return cms.PSet(
0300 cutName = cms.string('GsfEleValueMapIsoRhoCut'),
0301
0302
0303
0304 slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
0305 slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
0306 slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
0307 slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
0308 constTermEB = cms.double( wpEB.trkIsoConstTerm ),
0309 constTermEE = cms.double( wpEE.trkIsoConstTerm ),
0310
0311 rhoEtStartEB = cms.double( 999999.),
0312 rhoEtStartEE = cms.double( 999999.),
0313 rhoEAEB = cms.double( 0. ),
0314 rhoEAEE = cms.double( 0. ),
0315 rho = cms.InputTag(""),
0316 value = cms.InputTag("heepIDVarValueMaps","eleTrkPtIsoNoJetCore"),
0317 needsAdditionalProducts = cms.bool(True),
0318 isIgnored = cms.bool(False)
0319 )
0320 def psetGsfEleTrkPtFall16IsoCut(wpEB, wpEE):
0321 return cms.PSet(
0322 cutName = cms.string('GsfEleValueMapIsoRhoCut'),
0323
0324
0325
0326 slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
0327 slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
0328 slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
0329 slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
0330 constTermEB = cms.double( wpEB.trkIsoConstTerm ),
0331 constTermEE = cms.double( wpEE.trkIsoConstTerm ),
0332
0333 rhoEtStartEB = cms.double( 999999.),
0334 rhoEtStartEE = cms.double( 999999.),
0335 rhoEAEB = cms.double( 0. ),
0336 rhoEAEE = cms.double( 0. ),
0337 rho = cms.InputTag(""),
0338 value = cms.InputTag("heepIDVarValueMaps","eleTrkPtIso"),
0339 needsAdditionalProducts = cms.bool(True),
0340 isIgnored = cms.bool(False)
0341 )
0342
0343 def psetGsfEleEmHadD1IsoRhoCut(wpEB, wpEE,energyType="EcalTrk"):
0344 return cms.PSet(
0345 cutName = cms.string('GsfEleEmHadD1IsoRhoCut'),
0346 slopeTermEB = cms.double( wpEB.ehIsoSlopeTerm ),
0347 slopeTermEE = cms.double( wpEE.ehIsoSlopeTerm ),
0348 slopeStartEB = cms.double( wpEB.ehIsoSlopeStart ),
0349 slopeStartEE = cms.double( wpEE.ehIsoSlopeStart ),
0350 constTermEB = cms.double( wpEB.ehIsoConstTerm ),
0351 constTermEE = cms.double( wpEE.ehIsoConstTerm ),
0352 energyType = cms.string( energyType ),
0353 rhoConstant = cms.double( wpEB.effAreaForEHIso),
0354 rho = cms.InputTag("fixedGridRhoFastjetAll"),
0355 needsAdditionalProducts = cms.bool(True),
0356 isIgnored = cms.bool(False)
0357 )
0358
0359
0360 def psetGsfEleDxyCut(wpEB, wpEE):
0361 return cms.PSet(
0362 cutName = cms.string('GsfEleDxyCut'),
0363 dxyCutValueEB = cms.double( wpEB.dxyCut ),
0364 dxyCutValueEE = cms.double( wpEE.dxyCut ),
0365 vertexSrc = cms.InputTag("offlinePrimaryVertices"),
0366 vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
0367 barrelCutOff = cms.double(ebCutOff),
0368 needsAdditionalProducts = cms.bool(True),
0369 isIgnored = cms.bool(False)
0370 )
0371
0372
0373 def psetGsfEleMissingHitsCut(wpEB, wpEE):
0374 return cms.PSet(
0375 cutName = cms.string('GsfEleMissingHitsCut'),
0376 maxMissingHitsEB = cms.uint32( wpEB.maxMissingHitsCut ),
0377 maxMissingHitsEE = cms.uint32( wpEE.maxMissingHitsCut ),
0378 barrelCutOff = cms.double(ebCutOff),
0379 needsAdditionalProducts = cms.bool(False),
0380 isIgnored = cms.bool(False)
0381 )
0382 def psetGsfEleEcalDrivenCut(wpEB, wpEE):
0383 return cms.PSet(
0384 cutName = cms.string('GsfEleEcalDrivenCut'),
0385 ecalDrivenEB = cms.int32( wpEB.ecalDrivenCut ),
0386 ecalDrivenEE = cms.int32( wpEE.ecalDrivenCut ),
0387 barrelCutOff = cms.double(ebCutOff),
0388 needsAdditionalProducts = cms.bool(False),
0389 isIgnored = cms.bool(False)
0390 )
0391
0392
0393
0394
0395
0396 def configureHEEPElectronID_V51(wpEB, wpEE):
0397 """
0398 This function configures the full cms.PSet for a VID ID and returns it.
0399 The inputs: two objects of the type HEEP_WorkingPoint_V1, one
0400 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0401 """
0402 parameterSet = cms.PSet(
0403 idName = cms.string("heepElectronID-HEEPV51"),
0404 cutFlow = cms.VPSet(
0405 psetMinPtCut(cutValue=35.),
0406 psetGsfEleSCEtaMultiRangeCut(),
0407 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0408 psetGsfEleDPhiInCut(wpEB,wpEE),
0409 psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE),
0410 psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE),
0411 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0412 psetGsfEleTrkPtIsoCut(wpEB,wpEE),
0413 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE),
0414 psetGsfEleDxyCut(wpEB,wpEE),
0415 psetGsfEleMissingHitsCut(wpEB,wpEE),
0416 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0417 )
0418 )
0419 return parameterSet
0420
0421 def configureHEEPElectronID_V60(wpEB, wpEE):
0422 """
0423 This function configures the full cms.PSet for a VID ID and returns it.
0424 The inputs: two objects of the type HEEP_WorkingPoint_V1, one
0425 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0426 """
0427 parameterSet = cms.PSet(
0428 idName = cms.string("heepElectronID-HEEPV60"),
0429 cutFlow = cms.VPSet(
0430 psetMinPtCut(cutValue=35.),
0431 psetGsfEleSCEtaMultiRangeCut(),
0432 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0433 psetGsfEleDPhiInCut(wpEB,wpEE),
0434 psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE),
0435 psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE),
0436 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0437 psetGsfEleTrkPtIsoCut(wpEB,wpEE),
0438 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE),
0439 psetGsfEleDxyCut(wpEB,wpEE),
0440 psetGsfEleMissingHitsCut(wpEB,wpEE),
0441 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0442 )
0443 )
0444 return parameterSet
0445
0446
0447 def configureHEEPElectronID_V70(idName, wpEB, wpEE):
0448 """
0449 This function configures the full cms.PSet for a VID ID and returns it.
0450 The inputs: two objects of the type HEEP_WorkingPoint_V1, one
0451 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0452 """
0453 parameterSet = cms.PSet(
0454 idName = cms.string(idName),
0455 cutFlow = cms.VPSet(
0456 psetMinPtCut(cutValue=35.),
0457 psetGsfEleSCEtaMultiRangeCut(),
0458 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0459 psetGsfEleDPhiInCut(wpEB,wpEE),
0460 psetGsfEleFull5x5SigmaIEtaIEtaWithSatCut(wpEB,wpEE),
0461 psetGsfEleFull5x5E2x5OverE5x5WithSatCut(wpEB,wpEE),
0462 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0463 psetGsfEleTrkPtIsoCut(wpEB,wpEE,useHEEPIso=True),
0464 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE),
0465 psetGsfEleDxyCut(wpEB,wpEE),
0466 psetGsfEleMissingHitsCut(wpEB,wpEE),
0467 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0468 )
0469 )
0470 return parameterSet
0471
0472 def configureHEEPElectronID_V71(idName, wpEB, wpEE,minEt):
0473 """
0474 This function configures the full cms.PSet for a VID ID and returns it.
0475 The inputs: two objects of the type HEEP_WorkingPoint_V1, one
0476 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0477 """
0478 parameterSet = cms.PSet(
0479 idName = cms.string(idName),
0480 cutFlow = cms.VPSet(
0481 psetMinEcalEtCut(cutValue=minEt),
0482 psetGsfEleSCEtaMultiRangeCut(),
0483 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0484 psetGsfEleDPhiInCut(wpEB,wpEE),
0485 psetGsfEleFull5x5SigmaIEtaIEtaWithSatCut(wpEB,wpEE),
0486 psetGsfEleFull5x5E2x5OverE5x5WithSatCut(wpEB,wpEE),
0487 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0488 psetGsfEleTrkPtIsoCut(wpEB,wpEE,useHEEPIso=True),
0489 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE,energyType="Ecal"),
0490 psetGsfEleDxyCut(wpEB,wpEE),
0491 psetGsfEleMissingHitsCut(wpEB,wpEE),
0492 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0493 )
0494 )
0495 return parameterSet
0496
0497
0498 def configureHEEPElectronID_V60_80XAOD(idName, wpEB, wpEE):
0499 """
0500 This function configures the full cms.PSet for a VID ID and returns it.
0501 The inputs: two objects of the type HEEP_WorkingPoint_V1, one
0502 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0503 """
0504 parameterSet = cms.PSet(
0505 idName = cms.string(idName),
0506 cutFlow = cms.VPSet(
0507 psetMinPtCut(cutValue=35.),
0508 psetGsfEleSCEtaMultiRangeCut(),
0509 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0510 psetGsfEleDPhiInCut(wpEB,wpEE),
0511 psetGsfEleFull5x5SigmaIEtaIEtaWithSatCut(wpEB,wpEE),
0512 psetGsfEleFull5x5E2x5OverE5x5WithSatCut(wpEB,wpEE),
0513 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0514 psetGsfEleTrkPtNoJetCoreIsoCut(wpEB,wpEE),
0515 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE),
0516 psetGsfEleDxyCut(wpEB,wpEE),
0517 psetGsfEleMissingHitsCut(wpEB,wpEE),
0518 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0519 )
0520 )
0521 return parameterSet
0522
0523 def configureHEEPElectronID_V61(wpEB, wpEE):
0524 """
0525 This function configures the full cms.PSet for a VID ID and returns it.
0526 The inputs: two objects of the type HEEP_WorkingPoint_V2, one
0527 containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
0528 """
0529 parameterSet = cms.PSet(
0530 idName = cms.string("heepElectronID-HEEPV61"),
0531 cutFlow = cms.VPSet(
0532 psetMinPtCut(cutValue=35.),
0533 psetGsfEleSCEtaMultiRangeCut(),
0534 psetGsfEleDEtaInSeedCut(wpEB,wpEE),
0535 psetGsfEleDPhiInCut(wpEB,wpEE),
0536 psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE),
0537 psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE),
0538 psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE),
0539 psetGsfEleTrkPtIsoRhoCut(wpEB,wpEE),
0540 psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE),
0541 psetGsfEleDxyCut(wpEB,wpEE),
0542 psetGsfEleMissingHitsCut(wpEB,wpEE),
0543 psetGsfEleEcalDrivenCut(wpEB,wpEE)
0544 )
0545 )
0546 return parameterSet
0547
0548 def addHEEPVMProducerToSeq(process,seq,useMiniAOD, task=None):
0549 newTask = cms.Task()
0550 seq.associate(newTask)
0551 if task is not None:
0552 task.add(newTask)
0553
0554 process.load("RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi")
0555 newTask.add(process.heepIDVarValueMaps)
0556
0557 if useMiniAOD==False:
0558 process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
0559 process.load("PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi")
0560 process.load("PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi")
0561 process.load("PhysicsTools.PatAlgos.slimming.packedPFCandidates_cfi")
0562 from PhysicsTools.PatAlgos.slimming.packedPFCandidates_cfi import packedPFCandidates
0563 process.packedCandsForTkIso = packedPFCandidates.clone()
0564 process.packedCandsForTkIso.PuppiSrc=cms.InputTag("")
0565 process.packedCandsForTkIso.PuppiNoLepSrc=cms.InputTag("")
0566
0567 process.load("PhysicsTools.PatAlgos.slimming.lostTracks_cfi")
0568 from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import lostTracks
0569 process.lostTracksForTkIso = lostTracks.clone()
0570 process.lostTracksForTkIso.packedPFCandidates =cms.InputTag("packedCandsForTkIso")
0571 newTask.add(process.primaryVertexAssociation,
0572 process.offlineSlimmedPrimaryVertices,
0573 process.packedCandsForTkIso,
0574 process.lostTracksForTkIso)
0575
0576 def addHEEPProducersToSeq(process,seq,useMiniAOD, task=None):
0577 '''currently no additional products are needed to run the HEEP ID so this
0578 function simply remains as a placeholder
0579 '''
0580 return