CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
cutBasedElectronID_tools Namespace Reference

Classes

class  EleHLTSelection_V1
 
class  EleWorkingPoint_V1
 
class  EleWorkingPoint_V2
 
class  EleWorkingPoint_V3
 
class  IsolationCutInputs_V2
 

Functions

def configureVIDCutBasedEleHLTPreselection_V1
 
def configureVIDCutBasedEleID_V1
 
def configureVIDCutBasedEleID_V2
 
def configureVIDCutBasedEleID_V3
 
def psetConversionVetoCut
 
def psetDEtaInSeedCut
 
def psetDPhiInCut
 
def psetEcalPFClusterIsoCut
 
def psetEffAreaPFIsoCut
 
def psetEInerseMinusPInverseCut
 
def psetHadronicOverEMCut
 
def psetHcalPFClusterIsoCut
 
def psetMinPtCut
 
def psetMissingHitsCut
 
def psetNormalizedGsfChi2Cut
 
def psetPhoFull5x5SigmaIEtaIEtaCut
 
def psetPhoSCEtaMultiRangeCut
 
def psetTrkPtIsoCut
 

Variables

float ebCutOff = 1.479
 

Function Documentation

def cutBasedElectronID_tools.configureVIDCutBasedEleHLTPreselection_V1 (   wpEB,
  wpEE,
  ecalIsoInputs,
  hcalIsoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type EleHLTSelection_V1, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
The third and fourth arguments are objects that contain information necessary
for isolation calculations for ECAL and HCAL.

Definition at line 599 of file cutBasedElectronID_tools.py.

References psetDEtaInSeedCut(), psetDPhiInCut(), psetEcalPFClusterIsoCut(), psetEInerseMinusPInverseCut(), psetHadronicOverEMCut(), psetHcalPFClusterIsoCut(), psetMinPtCut(), psetNormalizedGsfChi2Cut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoSCEtaMultiRangeCut(), and psetTrkPtIsoCut().

600 def configureVIDCutBasedEleHLTPreselection_V1( wpEB, wpEE, ecalIsoInputs, hcalIsoInputs ):
601  """
602  This function configures the full cms.PSet for a VID ID and returns it.
603  The inputs: two objects of the type EleHLTSelection_V1, one
604  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
605  The third and fourth arguments are objects that contain information necessary
606  for isolation calculations for ECAL and HCAL.
607  """
608  # print "VID: Configuring cut set %s" % wpEB.idName
609  parameterSet = cms.PSet(
610  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
611  cutFlow = cms.VPSet(
612  psetMinPtCut(), # min pt cut
613  psetPhoSCEtaMultiRangeCut(), # eta cut
614  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
615  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
616  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
617  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
618  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
619  psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs), # ECAL PF Cluster isolation
620  psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs), # HCAL PF Cluster isolation
621  psetTrkPtIsoCut(wpEB, wpEE), # tracker isolation cut
622  psetNormalizedGsfChi2Cut(wpEB, wpEE) # GsfTrack chi2/NDOF cut
623  )
624  )
625  #
626  return parameterSet
627 
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V1 (   wpEB,
  wpEE 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type WorkingPoint_V1, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).

Definition at line 351 of file cutBasedElectronID_tools.py.

352 def configureVIDCutBasedEleID_V1( wpEB, wpEE ):
353  """
354  This function configures the full cms.PSet for a VID ID and returns it.
355  The inputs: two objects of the type WorkingPoint_V1, one
356  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
357  """
358  # print "VID: Configuring cut set %s" % wpEB.idName
359  parameterSet = cms.PSet(
360  #
361  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
362  cutFlow = cms.VPSet(
363  cms.PSet( cutName = cms.string("MinPtCut"),
364  minPt = cms.double(5.0),
365  needsAdditionalProducts = cms.bool(False),
366  isIgnored = cms.bool(False) ),
367  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
368  useAbsEta = cms.bool(True),
369  allowedEtaRanges = cms.VPSet(
370  cms.PSet( minEta = cms.double(0.0),
371  maxEta = cms.double(ebCutOff) ),
372  cms.PSet( minEta = cms.double(ebCutOff),
373  maxEta = cms.double(2.5) )
374  ),
375  needsAdditionalProducts = cms.bool(False),
376  isIgnored = cms.bool(False)),
377  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
378  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
379  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
380  barrelCutOff = cms.double(ebCutOff),
381  needsAdditionalProducts = cms.bool(False),
382  isIgnored = cms.bool(False)),
383  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
384  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
385  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
386  barrelCutOff = cms.double(ebCutOff),
387  needsAdditionalProducts = cms.bool(False),
388  isIgnored = cms.bool(False)),
389  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
390  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
391  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
392  barrelCutOff = cms.double(ebCutOff),
393  needsAdditionalProducts = cms.bool(False),
394  isIgnored = cms.bool(False)),
395  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
396  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
397  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
398  barrelCutOff = cms.double(ebCutOff),
399  needsAdditionalProducts = cms.bool(False),
400  isIgnored = cms.bool(False)),
401  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
402  dxyCutValueEB = cms.double( wpEB.dxyCut ),
403  dxyCutValueEE = cms.double( wpEE.dxyCut ),
404  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
405  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
406  barrelCutOff = cms.double(ebCutOff),
407  needsAdditionalProducts = cms.bool(True),
408  isIgnored = cms.bool(False)),
409  cms.PSet( cutName = cms.string('GsfEleDzCut'),
410  dzCutValueEB = cms.double( wpEB.dzCut ),
411  dzCutValueEE = cms.double( wpEE.dzCut ),
412  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
413  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
414  barrelCutOff = cms.double(ebCutOff),
415  needsAdditionalProducts = cms.bool(True),
416  isIgnored = cms.bool(False)),
417  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
418  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
419  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
420  barrelCutOff = cms.double(ebCutOff),
421  needsAdditionalProducts = cms.bool(False),
422  isIgnored = cms.bool(False)),
423  cms.PSet( cutName = cms.string('GsfEleDeltaBetaIsoCutStandalone'),
424  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithDBetaLowPtCut ),
425  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithDBetaHighPtCut ),
426  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithDBetaLowPtCut ),
427  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithDBetaHighPtCut ),
428  isRelativeIso = cms.bool(True),
429  deltaBetaConstant = cms.double(0.5),
430  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
431  barrelCutOff = cms.double(ebCutOff),
432  needsAdditionalProducts = cms.bool(False),
433  isIgnored = cms.bool(False)),
434  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
435  conversionSrc = cms.InputTag('allConversions'),
436  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
437  beamspotSrc = cms.InputTag('offlineBeamSpot'),
438  needsAdditionalProducts = cms.bool(True),
439  isIgnored = cms.bool(False)),
440  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
441  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
442  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
443  barrelCutOff = cms.double(ebCutOff),
444  needsAdditionalProducts = cms.bool(False),
445  isIgnored = cms.bool(False) ),
446  )
447  )
448  #
449  return parameterSet
450 
451 # -----------------------------
452 # Version V2 common definitions
453 # -----------------------------
454 
455 # This cut set definition is in the old style, with everything configured
456 # in one go. It is kept to minimize changes. New definitions should use
# PSets defined above instead.
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V2 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type WorkingPoint_V2, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
The third argument is an object that contains information necessary
for isolation calculations.

Definition at line 457 of file cutBasedElectronID_tools.py.

458 def configureVIDCutBasedEleID_V2( wpEB, wpEE, isoInputs ):
459  """
460  This function configures the full cms.PSet for a VID ID and returns it.
461  The inputs: two objects of the type WorkingPoint_V2, one
462  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
463  The third argument is an object that contains information necessary
464  for isolation calculations.
465  """
466  # print "VID: Configuring cut set %s" % wpEB.idName
467  parameterSet = cms.PSet(
468  #
469  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
470  cutFlow = cms.VPSet(
471  cms.PSet( cutName = cms.string("MinPtCut"),
472  minPt = cms.double(5.0),
473  needsAdditionalProducts = cms.bool(False),
474  isIgnored = cms.bool(False) ),
475  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
476  useAbsEta = cms.bool(True),
477  allowedEtaRanges = cms.VPSet(
478  cms.PSet( minEta = cms.double(0.0),
479  maxEta = cms.double(ebCutOff) ),
480  cms.PSet( minEta = cms.double(ebCutOff),
481  maxEta = cms.double(2.5) )
482  ),
483  needsAdditionalProducts = cms.bool(False),
484  isIgnored = cms.bool(False)),
485  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
486  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
487  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
488  barrelCutOff = cms.double(ebCutOff),
489  needsAdditionalProducts = cms.bool(False),
490  isIgnored = cms.bool(False)),
491  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
492  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
493  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
494  barrelCutOff = cms.double(ebCutOff),
495  needsAdditionalProducts = cms.bool(False),
496  isIgnored = cms.bool(False)),
497  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
498  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
499  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
500  barrelCutOff = cms.double(ebCutOff),
501  needsAdditionalProducts = cms.bool(False),
502  isIgnored = cms.bool(False)),
503  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
504  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
505  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
506  barrelCutOff = cms.double(ebCutOff),
507  needsAdditionalProducts = cms.bool(False),
508  isIgnored = cms.bool(False)),
509  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
510  dxyCutValueEB = cms.double( wpEB.dxyCut ),
511  dxyCutValueEE = cms.double( wpEE.dxyCut ),
512  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
513  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
514  barrelCutOff = cms.double(ebCutOff),
515  needsAdditionalProducts = cms.bool(True),
516  isIgnored = cms.bool(False)),
517  cms.PSet( cutName = cms.string('GsfEleDzCut'),
518  dzCutValueEB = cms.double( wpEB.dzCut ),
519  dzCutValueEE = cms.double( wpEE.dzCut ),
520  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
521  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
522  barrelCutOff = cms.double(ebCutOff),
523  needsAdditionalProducts = cms.bool(True),
524  isIgnored = cms.bool(False)),
525  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
526  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
527  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
528  barrelCutOff = cms.double(ebCutOff),
529  needsAdditionalProducts = cms.bool(False),
530  isIgnored = cms.bool(False)),
531  cms.PSet( cutName = cms.string('GsfEleEffAreaPFIsoCut'),
532  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
533  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
534  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
535  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
536  isRelativeIso = cms.bool(True),
537  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
538  barrelCutOff = cms.double(ebCutOff),
539  rho = cms.InputTag("fixedGridRhoFastjetAll"),
540  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
541  needsAdditionalProducts = cms.bool(True),
542  isIgnored = cms.bool(False) ),
543  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
544  conversionSrc = cms.InputTag('allConversions'),
545  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
546  beamspotSrc = cms.InputTag('offlineBeamSpot'),
547  needsAdditionalProducts = cms.bool(True),
548  isIgnored = cms.bool(False)),
549  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
550  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
551  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
552  barrelCutOff = cms.double(ebCutOff),
553  needsAdditionalProducts = cms.bool(False),
554  isIgnored = cms.bool(False) ),
555  )
556  )
557  #
558  return parameterSet
559 
560 
561 # ==============================================================
562 # Define the complete cut sets
563 # ==============================================================
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V3 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type WorkingPoint_V3, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
The third argument is an object that contains information necessary
for isolation calculations.
    In this version, the impact parameter cuts dxy and dz are not present

Definition at line 564 of file cutBasedElectronID_tools.py.

References psetConversionVetoCut(), psetDEtaInSeedCut(), psetDPhiInCut(), psetEffAreaPFIsoCut(), psetEInerseMinusPInverseCut(), psetHadronicOverEMCut(), psetMinPtCut(), psetMissingHitsCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), and psetPhoSCEtaMultiRangeCut().

565 def configureVIDCutBasedEleID_V3( wpEB, wpEE, isoInputs ):
566  """
567  This function configures the full cms.PSet for a VID ID and returns it.
568  The inputs: two objects of the type WorkingPoint_V3, one
569  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
570  The third argument is an object that contains information necessary
571  for isolation calculations.
572  In this version, the impact parameter cuts dxy and dz are not present
573  """
574  # print "VID: Configuring cut set %s" % wpEB.idName
575  parameterSet = cms.PSet(
576  #
577  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
578  cutFlow = cms.VPSet(
579  psetMinPtCut(),
580  psetPhoSCEtaMultiRangeCut(), # eta cut
581  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
582  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
583  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
584  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
585  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
586  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
588  psetMissingHitsCut(wpEB, wpEE)
589  )
590  )
591  #
592  return parameterSet
593 
594 
595 # -----------------------------
596 # HLT-safe common definitions
597 # -----------------------------
598 
def cutBasedElectronID_tools.psetConversionVetoCut ( )

Definition at line 323 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3().

325  return cms.PSet(
326  cutName = cms.string('GsfEleConversionVetoCut'),
327  conversionSrc = cms.InputTag('allConversions'),
328  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
329  beamspotSrc = cms.InputTag('offlineBeamSpot'),
330  needsAdditionalProducts = cms.bool(True),
331  isIgnored = cms.bool(False)
332  )
def cutBasedElectronID_tools.psetDEtaInSeedCut (   wpEB,
  wpEE 
)

Definition at line 196 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

197 def psetDEtaInSeedCut(wpEB, wpEE):
198  return cms.PSet(
199  cutName = cms.string('GsfEleDEtaInSeedCut'),
200  dEtaInSeedCutValueEB = cms.double( wpEB.dEtaInSeedCut ),
201  dEtaInSeedCutValueEE = cms.double( wpEE.dEtaInSeedCut ),
202  barrelCutOff = cms.double(ebCutOff),
203  needsAdditionalProducts = cms.bool(False),
204  isIgnored = cms.bool(False)
205  )
206 
# Configure dPhiIn cut
def cutBasedElectronID_tools.psetDPhiInCut (   wpEB,
  wpEE 
)

Definition at line 207 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

208 def psetDPhiInCut(wpEB, wpEE):
209  return cms.PSet(
210  cutName = cms.string('GsfEleDPhiInCut'),
211  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
212  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
213  barrelCutOff = cms.double(ebCutOff),
214  needsAdditionalProducts = cms.bool(False),
215  isIgnored = cms.bool(False)
216  )
217 
# Configure H/E cut
def cutBasedElectronID_tools.psetEcalPFClusterIsoCut (   wpEB,
  wpEE,
  ecalIsoInputs 
)

Definition at line 241 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

242 def psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs):
243  return cms.PSet(
244  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
245  isoType = cms.int32( 0 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
246  isoCutEBLowPt = cms.double( wpEB.ecalPFClusterIsoLowPtCut ),
247  isoCutEBHighPt = cms.double( wpEB.ecalPFClusterIsoHighPtCut ),
248  isoCutEELowPt = cms.double( wpEE.ecalPFClusterIsoLowPtCut ),
249  isoCutEEHighPt = cms.double( wpEE.ecalPFClusterIsoHighPtCut ),
250  isRelativeIso = cms.bool(True),
251  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
252  barrelCutOff = cms.double(ebCutOff),
253  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
254  # while HLT uses ...AllCalo
255  effAreasConfigFile = cms.FileInPath( ecalIsoInputs.isoEffAreas ),
256  needsAdditionalProducts = cms.bool(True),
257  isIgnored = cms.bool(False)
258  )
259 
260 # Configure HCAL PF Cluster isolation cut. Note that this cut requires
# effective area constants file as input
def cutBasedElectronID_tools.psetEffAreaPFIsoCut (   wpEB,
  wpEE,
  isoInputs 
)

Definition at line 307 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3().

308 def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs):
309  return cms.PSet(
310  cutName = cms.string('GsfEleEffAreaPFIsoCut'),
311  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
312  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
313  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
314  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
315  isRelativeIso = cms.bool(True),
316  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
317  barrelCutOff = cms.double(ebCutOff),
318  rho = cms.InputTag("fixedGridRhoFastjetAll"),
319  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
320  needsAdditionalProducts = cms.bool(True),
321  isIgnored = cms.bool(False)
322  )
def cutBasedElectronID_tools.psetEInerseMinusPInverseCut (   wpEB,
  wpEE 
)

Definition at line 229 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

230 def psetEInerseMinusPInverseCut(wpEB, wpEE):
231  return cms.PSet(
232  cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
233  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
234  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
235  barrelCutOff = cms.double(ebCutOff),
236  needsAdditionalProducts = cms.bool(False),
237  isIgnored = cms.bool(False)
238  )
239 
240 # Configure ECAL PF Cluster isolation cut. Note that this cut requires
# effective area constants file as input
def cutBasedElectronID_tools.psetHadronicOverEMCut (   wpEB,
  wpEE 
)

Definition at line 218 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

219 def psetHadronicOverEMCut(wpEB, wpEE):
220  return cms.PSet(
221  cutName = cms.string('GsfEleHadronicOverEMCut'),
222  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
223  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
224  barrelCutOff = cms.double(ebCutOff),
225  needsAdditionalProducts = cms.bool(False),
226  isIgnored = cms.bool(False)
227  )
228 
# Configure |1/E-1/p| cut
def cutBasedElectronID_tools.psetHcalPFClusterIsoCut (   wpEB,
  wpEE,
  hcalIsoInputs 
)

Definition at line 261 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

262 def psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs):
263  return cms.PSet(
264  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
265  isoType = cms.int32( 1 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
266  isoCutEBLowPt = cms.double( wpEB.hcalPFClusterIsoLowPtCut ),
267  isoCutEBHighPt = cms.double( wpEB.hcalPFClusterIsoHighPtCut ),
268  isoCutEELowPt = cms.double( wpEE.hcalPFClusterIsoLowPtCut ),
269  isoCutEEHighPt = cms.double( wpEE.hcalPFClusterIsoHighPtCut ),
270  isRelativeIso = cms.bool(True),
271  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
272  barrelCutOff = cms.double(ebCutOff),
273  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
274  # while HLT uses ...AllCalo
275  effAreasConfigFile = cms.FileInPath( hcalIsoInputs.isoEffAreas ),
276  needsAdditionalProducts = cms.bool(True),
277  isIgnored = cms.bool(False)
278  )
279 
# Configure tracker isolation cut
def cutBasedElectronID_tools.psetMinPtCut ( )

Definition at line 161 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

162 def psetMinPtCut():
163  return cms.PSet(
164  cutName = cms.string("MinPtCut"),
165  minPt = cms.double(5.0),
166  needsAdditionalProducts = cms.bool(False),
167  isIgnored = cms.bool(False)
168  )
169 
# Take all particles in the eta ranges 0-ebCutOff and ebCutOff-2.5
def cutBasedElectronID_tools.psetMissingHitsCut (   wpEB,
  wpEE 
)

Definition at line 333 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3().

334 def psetMissingHitsCut(wpEB, wpEE):
335  return cms.PSet(
336  cutName = cms.string('GsfEleMissingHitsCut'),
337  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
338  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
339  barrelCutOff = cms.double(ebCutOff),
340  needsAdditionalProducts = cms.bool(False),
341  isIgnored = cms.bool(False)
342  )
343 
344 
345 # -----------------------------
346 # Version V1 common definitions
347 # -----------------------------
348 
349 # This cut set definition is in the old style, with everything configured
350 # in one go. It is kept to minimize changes. New definitions should use
# PSets defined above instead.
def cutBasedElectronID_tools.psetNormalizedGsfChi2Cut (   wpEB,
  wpEE 
)

Definition at line 297 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

298 def psetNormalizedGsfChi2Cut(wpEB, wpEE):
299  return cms.PSet(
300  cutName = cms.string('GsfEleNormalizedGsfChi2Cut'),
301  normalizedGsfChi2CutValueEB = cms.double( wpEB.normalizedGsfChi2Cut ),
302  normalizedGsfChi2CutValueEE = cms.double( wpEE.normalizedGsfChi2Cut ),
303  barrelCutOff = cms.double(ebCutOff),
304  needsAdditionalProducts = cms.bool(False),
305  isIgnored = cms.bool(False)
306  )
def cutBasedElectronID_tools.psetPhoFull5x5SigmaIEtaIEtaCut (   wpEB,
  wpEE 
)

Definition at line 185 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

186 def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE):
187  return cms.PSet(
188  cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
189  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
190  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
191  barrelCutOff = cms.double(ebCutOff),
192  needsAdditionalProducts = cms.bool(False),
193  isIgnored = cms.bool(False)
194  )
195 
# Configure the cut on dEta seed
def cutBasedElectronID_tools.psetPhoSCEtaMultiRangeCut ( )

Definition at line 170 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

172  return cms.PSet(
173  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
174  useAbsEta = cms.bool(True),
175  allowedEtaRanges = cms.VPSet(
176  cms.PSet( minEta = cms.double(0.0),
177  maxEta = cms.double(ebCutOff) ),
178  cms.PSet( minEta = cms.double(ebCutOff),
179  maxEta = cms.double(2.5) )
180  ),
181  needsAdditionalProducts = cms.bool(False),
182  isIgnored = cms.bool(False)
183  )
184 
# Configure the cut on full5x5 sigmaIEtaIEta
def cutBasedElectronID_tools.psetTrkPtIsoCut (   wpEB,
  wpEE 
)

Definition at line 280 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

281 def psetTrkPtIsoCut(wpEB, wpEE):
282  return cms.PSet(
283  cutName = cms.string('GsfEleTrkPtIsoCut'),
284  # Three constants for the GsfEleTrkPtIsoCut
285  # cut = constTerm if Et < slopeStart
286  # cut = slopeTerm * (Et - slopeStart) + constTerm if Et >= slopeStart
287  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
288  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
289  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
290  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
291  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
292  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
293  needsAdditionalProducts = cms.bool(False),
294  isIgnored = cms.bool(False)
295  )
296 
# Configure GsfTrack chi2/NDOF cut

Variable Documentation

float cutBasedElectronID_tools.ebCutOff = 1.479

Definition at line 5 of file cutBasedElectronID_tools.py.