CMS 3D CMS Logo

Classes | Functions | Variables
cutBasedElectronID_tools Namespace Reference

Classes

class  EleHLTSelection_V1
 
class  EleWorkingPoint_V1
 
class  EleWorkingPoint_V2
 
class  EleWorkingPoint_V3
 
class  EleWorkingPoint_V4
 
class  EleWorkingPoint_V5
 
class  IsolationCutInputs_V2
 

Functions

def configureVIDCutBasedEleHLTPreselection_V1 (wpEB, wpEE, ecalIsoInputs, hcalIsoInputs)
 
def configureVIDCutBasedEleID_V1 (wpEB, wpEE)
 
def configureVIDCutBasedEleID_V2 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedEleID_V3 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedEleID_V4 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedEleID_V5 (wpEB, wpEE, isoInputs)
 
def psetConversionVetoCut ()
 
def psetDEtaInSeedCut (wpEB, wpEE)
 
def psetDPhiInCut (wpEB, wpEE)
 
def psetEcalPFClusterIsoCut (wpEB, wpEE, ecalIsoInputs)
 
def psetEffAreaPFIsoCut (wpEB, wpEE, isoInputs)
 
def psetEInerseMinusPInverseCut (wpEB, wpEE)
 
def psetHadronicOverEMCut (wpEB, wpEE)
 
def psetHadronicOverEMEnergyScaledCut (wpEB, wpEE)
 
def psetHcalPFClusterIsoCut (wpEB, wpEE, hcalIsoInputs)
 
def psetMinPtCut ()
 
def psetMissingHitsCut (wpEB, wpEE)
 
def psetNormalizedGsfChi2Cut (wpEB, wpEE)
 
def psetPhoFull5x5SigmaIEtaIEtaCut (wpEB, wpEE)
 
def psetPhoSCEtaMultiRangeCut ()
 
def psetRelPFIsoScaledCut (wpEB, wpEE, isoInputs)
 
def psetTrkPtIsoCut (wpEB, wpEE)
 

Variables

 ebCutOff
 

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 761 of file cutBasedElectronID_tools.py.

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

761 def configureVIDCutBasedEleHLTPreselection_V1( wpEB, wpEE, ecalIsoInputs, hcalIsoInputs ):
762  """
763  This function configures the full cms.PSet for a VID ID and returns it.
764  The inputs: two objects of the type EleHLTSelection_V1, one
765  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
766  The third and fourth arguments are objects that contain information necessary
767  for isolation calculations for ECAL and HCAL.
768  """
769  # print "VID: Configuring cut set %s" % wpEB.idName
770  parameterSet = cms.PSet(
771  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
772  cutFlow = cms.VPSet(
773  psetMinPtCut(), # min pt cut
774  psetPhoSCEtaMultiRangeCut(), # eta cut
775  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
776  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
777  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
778  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
779  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
780  psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs), # ECAL PF Cluster isolation
781  psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs), # HCAL PF Cluster isolation
782  psetTrkPtIsoCut(wpEB, wpEE), # tracker isolation cut
783  psetNormalizedGsfChi2Cut(wpEB, wpEE) # GsfTrack chi2/NDOF cut
784  )
785  )
786  #
787  return parameterSet
788 
789 
def psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs)
def psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs)
def configureVIDCutBasedEleHLTPreselection_V1(wpEB, wpEE, ecalIsoInputs, hcalIsoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
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 455 of file cutBasedElectronID_tools.py.

456  """
457  This function configures the full cms.PSet for a VID ID and returns it.
458  The inputs: two objects of the type WorkingPoint_V1, one
459  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
460  """
461  # print "VID: Configuring cut set %s" % wpEB.idName
462  parameterSet = cms.PSet(
463  #
464  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
465  cutFlow = cms.VPSet(
466  cms.PSet( cutName = cms.string("MinPtCut"),
467  minPt = cms.double(5.0),
468  needsAdditionalProducts = cms.bool(False),
469  isIgnored = cms.bool(False) ),
470  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
471  useAbsEta = cms.bool(True),
472  allowedEtaRanges = cms.VPSet(
473  cms.PSet( minEta = cms.double(0.0),
474  maxEta = cms.double(ebCutOff) ),
475  cms.PSet( minEta = cms.double(ebCutOff),
476  maxEta = cms.double(2.5) )
477  ),
478  needsAdditionalProducts = cms.bool(False),
479  isIgnored = cms.bool(False)),
480  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
481  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
482  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
483  barrelCutOff = cms.double(ebCutOff),
484  needsAdditionalProducts = cms.bool(False),
485  isIgnored = cms.bool(False)),
486  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
487  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
488  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
489  barrelCutOff = cms.double(ebCutOff),
490  needsAdditionalProducts = cms.bool(False),
491  isIgnored = cms.bool(False)),
492  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
493  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
494  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
495  barrelCutOff = cms.double(ebCutOff),
496  needsAdditionalProducts = cms.bool(False),
497  isIgnored = cms.bool(False)),
498  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
499  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
500  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
501  barrelCutOff = cms.double(ebCutOff),
502  needsAdditionalProducts = cms.bool(False),
503  isIgnored = cms.bool(False)),
504  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
505  dxyCutValueEB = cms.double( wpEB.dxyCut ),
506  dxyCutValueEE = cms.double( wpEE.dxyCut ),
507  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
508  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
509  barrelCutOff = cms.double(ebCutOff),
510  needsAdditionalProducts = cms.bool(True),
511  isIgnored = cms.bool(False)),
512  cms.PSet( cutName = cms.string('GsfEleDzCut'),
513  dzCutValueEB = cms.double( wpEB.dzCut ),
514  dzCutValueEE = cms.double( wpEE.dzCut ),
515  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
516  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
517  barrelCutOff = cms.double(ebCutOff),
518  needsAdditionalProducts = cms.bool(True),
519  isIgnored = cms.bool(False)),
520  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
521  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
522  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
523  barrelCutOff = cms.double(ebCutOff),
524  needsAdditionalProducts = cms.bool(False),
525  isIgnored = cms.bool(False)),
526  cms.PSet( cutName = cms.string('GsfEleDeltaBetaIsoCutStandalone'),
527  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithDBetaLowPtCut ),
528  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithDBetaHighPtCut ),
529  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithDBetaLowPtCut ),
530  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithDBetaHighPtCut ),
531  isRelativeIso = cms.bool(True),
532  deltaBetaConstant = cms.double(0.5),
533  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
534  barrelCutOff = cms.double(ebCutOff),
535  needsAdditionalProducts = cms.bool(False),
536  isIgnored = cms.bool(False)),
537  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
538  conversionSrc = cms.InputTag('allConversions'),
539  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
540  beamspotSrc = cms.InputTag('offlineBeamSpot'),
541  needsAdditionalProducts = cms.bool(True),
542  isIgnored = cms.bool(False)),
543  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
544  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
545  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
546  barrelCutOff = cms.double(ebCutOff),
547  needsAdditionalProducts = cms.bool(False),
548  isIgnored = cms.bool(False) ),
549  )
550  )
551  #
552  return parameterSet
553 
554 # -----------------------------
555 # Version V2 common definitions
556 # -----------------------------
557 
558 # This cut set definition is in the old style, with everything configured
559 # in one go. It is kept to minimize changes. New definitions should use
560 # PSets defined above instead.
def configureVIDCutBasedEleID_V1(wpEB, wpEE)
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 561 of file cutBasedElectronID_tools.py.

561 def configureVIDCutBasedEleID_V2( wpEB, wpEE, isoInputs ):
562  """
563  This function configures the full cms.PSet for a VID ID and returns it.
564  The inputs: two objects of the type WorkingPoint_V2, one
565  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
566  The third argument is an object that contains information necessary
567  for isolation calculations.
568  """
569  # print "VID: Configuring cut set %s" % wpEB.idName
570  parameterSet = cms.PSet(
571  #
572  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
573  cutFlow = cms.VPSet(
574  cms.PSet( cutName = cms.string("MinPtCut"),
575  minPt = cms.double(5.0),
576  needsAdditionalProducts = cms.bool(False),
577  isIgnored = cms.bool(False) ),
578  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
579  useAbsEta = cms.bool(True),
580  allowedEtaRanges = cms.VPSet(
581  cms.PSet( minEta = cms.double(0.0),
582  maxEta = cms.double(ebCutOff) ),
583  cms.PSet( minEta = cms.double(ebCutOff),
584  maxEta = cms.double(2.5) )
585  ),
586  needsAdditionalProducts = cms.bool(False),
587  isIgnored = cms.bool(False)),
588  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
589  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
590  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
591  barrelCutOff = cms.double(ebCutOff),
592  needsAdditionalProducts = cms.bool(False),
593  isIgnored = cms.bool(False)),
594  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
595  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
596  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
597  barrelCutOff = cms.double(ebCutOff),
598  needsAdditionalProducts = cms.bool(False),
599  isIgnored = cms.bool(False)),
600  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
601  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
602  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
603  barrelCutOff = cms.double(ebCutOff),
604  needsAdditionalProducts = cms.bool(False),
605  isIgnored = cms.bool(False)),
606  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
607  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
608  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
609  barrelCutOff = cms.double(ebCutOff),
610  needsAdditionalProducts = cms.bool(False),
611  isIgnored = cms.bool(False)),
612  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
613  dxyCutValueEB = cms.double( wpEB.dxyCut ),
614  dxyCutValueEE = cms.double( wpEE.dxyCut ),
615  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
616  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
617  barrelCutOff = cms.double(ebCutOff),
618  needsAdditionalProducts = cms.bool(True),
619  isIgnored = cms.bool(False)),
620  cms.PSet( cutName = cms.string('GsfEleDzCut'),
621  dzCutValueEB = cms.double( wpEB.dzCut ),
622  dzCutValueEE = cms.double( wpEE.dzCut ),
623  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
624  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
625  barrelCutOff = cms.double(ebCutOff),
626  needsAdditionalProducts = cms.bool(True),
627  isIgnored = cms.bool(False)),
628  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
629  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
630  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
631  barrelCutOff = cms.double(ebCutOff),
632  needsAdditionalProducts = cms.bool(False),
633  isIgnored = cms.bool(False)),
634  cms.PSet( cutName = cms.string('GsfEleEffAreaPFIsoCut'),
635  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
636  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
637  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
638  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
639  isRelativeIso = cms.bool(True),
640  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
641  barrelCutOff = cms.double(ebCutOff),
642  rho = cms.InputTag("fixedGridRhoFastjetAll"),
643  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
644  needsAdditionalProducts = cms.bool(True),
645  isIgnored = cms.bool(False) ),
646  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
647  conversionSrc = cms.InputTag('allConversions'),
648  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
649  beamspotSrc = cms.InputTag('offlineBeamSpot'),
650  needsAdditionalProducts = cms.bool(True),
651  isIgnored = cms.bool(False)),
652  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
653  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
654  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
655  barrelCutOff = cms.double(ebCutOff),
656  needsAdditionalProducts = cms.bool(False),
657  isIgnored = cms.bool(False) ),
658  )
659  )
660  #
661  return parameterSet
662 
663 
664 # ==============================================================
665 # Define the complete cut sets
666 # ==============================================================
667 
def configureVIDCutBasedEleID_V2(wpEB, wpEE, isoInputs)
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 668 of file cutBasedElectronID_tools.py.

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

668 def configureVIDCutBasedEleID_V3( wpEB, wpEE, isoInputs ):
669  """
670  This function configures the full cms.PSet for a VID ID and returns it.
671  The inputs: two objects of the type WorkingPoint_V3, one
672  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
673  The third argument is an object that contains information necessary
674  for isolation calculations.
675  In this version, the impact parameter cuts dxy and dz are not present
676  """
677  # print "VID: Configuring cut set %s" % wpEB.idName
678  parameterSet = cms.PSet(
679  #
680  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
681  cutFlow = cms.VPSet(
682  psetMinPtCut(),
683  psetPhoSCEtaMultiRangeCut(), # eta cut
684  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
685  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
686  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
687  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
688  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
689  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
691  psetMissingHitsCut(wpEB, wpEE)
692  )
693  )
694  #
695  return parameterSet
696 
def configureVIDCutBasedEleID_V3(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs)
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V4 (   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 energy and pileup dependent hOverE is introduced

Definition at line 697 of file cutBasedElectronID_tools.py.

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

697 def configureVIDCutBasedEleID_V4( wpEB, wpEE, isoInputs ):
698  """
699  This function configures the full cms.PSet for a VID ID and returns it.
700  The inputs: two objects of the type WorkingPoint_V3, one
701  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
702  The third argument is an object that contains information necessary
703  for isolation calculations.
704  In this version, the energy and pileup dependent hOverE is introduced
705  """
706  # print "VID: Configuring cut set %s" % wpEB.idName
707  parameterSet = cms.PSet(
708  #
709  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
710  cutFlow = cms.VPSet(
711  psetMinPtCut(),
712  psetPhoSCEtaMultiRangeCut(), # eta cut
713  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
714  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
715  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
716  psetHadronicOverEMEnergyScaledCut(wpEB, wpEE), # H/E cut
717  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
718  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
720  psetMissingHitsCut(wpEB, wpEE)
721  )
722  )
723  #
724  return parameterSet
725 
def psetHadronicOverEMEnergyScaledCut(wpEB, wpEE)
def configureVIDCutBasedEleID_V4(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs)
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V5 (   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 pt dependent isolation is introduced

Definition at line 726 of file cutBasedElectronID_tools.py.

References psetConversionVetoCut(), psetDEtaInSeedCut(), psetDPhiInCut(), psetEInerseMinusPInverseCut(), psetHadronicOverEMEnergyScaledCut(), psetMinPtCut(), psetMissingHitsCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoSCEtaMultiRangeCut(), and psetRelPFIsoScaledCut().

726 def configureVIDCutBasedEleID_V5( wpEB, wpEE, isoInputs ):
727  """
728  This function configures the full cms.PSet for a VID ID and returns it.
729  The inputs: two objects of the type WorkingPoint_V3, one
730  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
731  The third argument is an object that contains information necessary
732  for isolation calculations.
733  In this version, the pt dependent isolation is introduced
734  """
735  # print "VID: Configuring cut set %s" % wpEB.idName
736  parameterSet = cms.PSet(
737  #
738  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
739  cutFlow = cms.VPSet(
740  psetMinPtCut(),
741  psetPhoSCEtaMultiRangeCut(), # eta cut
742  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
743  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
744  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
745  psetHadronicOverEMEnergyScaledCut(wpEB, wpEE), # H/E cut
746  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
747  psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
749  psetMissingHitsCut(wpEB, wpEE)
750  )
751  )
752  #
753  return parameterSet
754 
755 
756 # -----------------------------
757 # HLT-safe common definitions
758 # -----------------------------
759 
760 
def psetHadronicOverEMEnergyScaledCut(wpEB, wpEE)
def psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs)
def configureVIDCutBasedEleID_V5(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
def cutBasedElectronID_tools.psetConversionVetoCut ( )

Definition at line 427 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

428  return cms.PSet(
429  cutName = cms.string('GsfEleConversionVetoCut'),
430  conversionSrc = cms.InputTag('allConversions'),
431  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
432  beamspotSrc = cms.InputTag('offlineBeamSpot'),
433  needsAdditionalProducts = cms.bool(True),
434  isIgnored = cms.bool(False)
435  )
436 
def cutBasedElectronID_tools.psetDEtaInSeedCut (   wpEB,
  wpEE 
)

Definition at line 267 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

267 def psetDEtaInSeedCut(wpEB, wpEE):
268  return cms.PSet(
269  cutName = cms.string('GsfEleDEtaInSeedCut'),
270  dEtaInSeedCutValueEB = cms.double( wpEB.dEtaInSeedCut ),
271  dEtaInSeedCutValueEE = cms.double( wpEE.dEtaInSeedCut ),
272  barrelCutOff = cms.double(ebCutOff),
273  needsAdditionalProducts = cms.bool(False),
274  isIgnored = cms.bool(False)
275  )
276 
277 # Configure dPhiIn cut
def cutBasedElectronID_tools.psetDPhiInCut (   wpEB,
  wpEE 
)

Definition at line 278 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

278 def psetDPhiInCut(wpEB, wpEE):
279  return cms.PSet(
280  cutName = cms.string('GsfEleDPhiInCut'),
281  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
282  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
283  barrelCutOff = cms.double(ebCutOff),
284  needsAdditionalProducts = cms.bool(False),
285  isIgnored = cms.bool(False)
286  )
287 
288 # Configure H/E cut
def cutBasedElectronID_tools.psetEcalPFClusterIsoCut (   wpEB,
  wpEE,
  ecalIsoInputs 
)

Definition at line 329 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

329 def psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs):
330  return cms.PSet(
331  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
332  isoType = cms.int32( 0 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
333  isoCutEBLowPt = cms.double( wpEB.ecalPFClusterIsoLowPtCut ),
334  isoCutEBHighPt = cms.double( wpEB.ecalPFClusterIsoHighPtCut ),
335  isoCutEELowPt = cms.double( wpEE.ecalPFClusterIsoLowPtCut ),
336  isoCutEEHighPt = cms.double( wpEE.ecalPFClusterIsoHighPtCut ),
337  isRelativeIso = cms.bool(True),
338  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
339  barrelCutOff = cms.double(ebCutOff),
340  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
341  # while HLT uses ...AllCalo
342  effAreasConfigFile = cms.FileInPath( ecalIsoInputs.isoEffAreas ),
343  needsAdditionalProducts = cms.bool(True),
344  isIgnored = cms.bool(False)
345  )
346 
347 # Configure HCAL PF Cluster isolation cut. Note that this cut requires
348 # effective area constants file as input
def psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs)
def cutBasedElectronID_tools.psetEffAreaPFIsoCut (   wpEB,
  wpEE,
  isoInputs 
)

Definition at line 396 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3(), and configureVIDCutBasedEleID_V4().

396 def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs):
397  return cms.PSet(
398  cutName = cms.string('GsfEleEffAreaPFIsoCut'),
399  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
400  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
401  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
402  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
403  isRelativeIso = cms.bool(True),
404  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
405  barrelCutOff = cms.double(ebCutOff),
406  rho = cms.InputTag("fixedGridRhoFastjetAll"),
407  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
408  needsAdditionalProducts = cms.bool(True),
409  isIgnored = cms.bool(False)
410  )
411 
def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs)
def cutBasedElectronID_tools.psetEInerseMinusPInverseCut (   wpEB,
  wpEE 
)

Definition at line 317 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

318  return cms.PSet(
319  cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
320  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
321  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
322  barrelCutOff = cms.double(ebCutOff),
323  needsAdditionalProducts = cms.bool(False),
324  isIgnored = cms.bool(False)
325  )
326 
327 # Configure ECAL PF Cluster isolation cut. Note that this cut requires
328 # effective area constants file as input
def cutBasedElectronID_tools.psetHadronicOverEMCut (   wpEB,
  wpEE 
)

Definition at line 289 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), and configureVIDCutBasedEleID_V3().

289 def psetHadronicOverEMCut(wpEB, wpEE):
290  return cms.PSet(
291  cutName = cms.string('GsfEleHadronicOverEMCut'),
292  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
293  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
294  barrelCutOff = cms.double(ebCutOff),
295  needsAdditionalProducts = cms.bool(False),
296  isIgnored = cms.bool(False)
297  )
298 
299 # Configure energy and pileup dependent H/E cut
def cutBasedElectronID_tools.psetHadronicOverEMEnergyScaledCut (   wpEB,
  wpEE 
)

Definition at line 300 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

301  return cms.PSet(
302  cutName = cms.string('GsfEleHadronicOverEMEnergyScaledCut'),
303  barrelC0 = cms.double( wpEB.hOverECut_C0 ),
304  barrelCE = cms.double( wpEB.hOverECut_CE ),
305  barrelCr = cms.double( wpEB.hOverECut_Cr ),
306  endcapC0 = cms.double( wpEE.hOverECut_C0 ),
307  endcapCE = cms.double( wpEE.hOverECut_CE ),
308  endcapCr = cms.double( wpEE.hOverECut_Cr ),
309  rho = cms.InputTag("fixedGridRhoFastjetAll"),
310  barrelCutOff = cms.double(ebCutOff),
311  needsAdditionalProducts = cms.bool(True),
312  isIgnored = cms.bool(False)
313  )
314 
315 
316 # Configure |1/E-1/p| cut
def psetHadronicOverEMEnergyScaledCut(wpEB, wpEE)
def cutBasedElectronID_tools.psetHcalPFClusterIsoCut (   wpEB,
  wpEE,
  hcalIsoInputs 
)

Definition at line 349 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

349 def psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs):
350  return cms.PSet(
351  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
352  isoType = cms.int32( 1 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
353  isoCutEBLowPt = cms.double( wpEB.hcalPFClusterIsoLowPtCut ),
354  isoCutEBHighPt = cms.double( wpEB.hcalPFClusterIsoHighPtCut ),
355  isoCutEELowPt = cms.double( wpEE.hcalPFClusterIsoLowPtCut ),
356  isoCutEEHighPt = cms.double( wpEE.hcalPFClusterIsoHighPtCut ),
357  isRelativeIso = cms.bool(True),
358  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
359  barrelCutOff = cms.double(ebCutOff),
360  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
361  # while HLT uses ...AllCalo
362  effAreasConfigFile = cms.FileInPath( hcalIsoInputs.isoEffAreas ),
363  needsAdditionalProducts = cms.bool(True),
364  isIgnored = cms.bool(False)
365  )
366 
367 # Configure tracker isolation cut
def psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs)
def cutBasedElectronID_tools.psetMinPtCut ( )

Definition at line 232 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

233  return cms.PSet(
234  cutName = cms.string("MinPtCut"),
235  minPt = cms.double(5.0),
236  needsAdditionalProducts = cms.bool(False),
237  isIgnored = cms.bool(False)
238  )
239 
240 # Take all particles in the eta ranges 0-ebCutOff and ebCutOff-2.5
def cutBasedElectronID_tools.psetMissingHitsCut (   wpEB,
  wpEE 
)

Definition at line 437 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

437 def psetMissingHitsCut(wpEB, wpEE):
438  return cms.PSet(
439  cutName = cms.string('GsfEleMissingHitsCut'),
440  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
441  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
442  barrelCutOff = cms.double(ebCutOff),
443  needsAdditionalProducts = cms.bool(False),
444  isIgnored = cms.bool(False)
445  )
446 
447 
448 # -----------------------------
449 # Version V1 common definitions
450 # -----------------------------
451 
452 # This cut set definition is in the old style, with everything configured
453 # in one go. It is kept to minimize changes. New definitions should use
454 # PSets defined above instead.
def cutBasedElectronID_tools.psetNormalizedGsfChi2Cut (   wpEB,
  wpEE 
)

Definition at line 386 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

386 def psetNormalizedGsfChi2Cut(wpEB, wpEE):
387  return cms.PSet(
388  cutName = cms.string('GsfEleNormalizedGsfChi2Cut'),
389  normalizedGsfChi2CutValueEB = cms.double( wpEB.normalizedGsfChi2Cut ),
390  normalizedGsfChi2CutValueEE = cms.double( wpEE.normalizedGsfChi2Cut ),
391  barrelCutOff = cms.double(ebCutOff),
392  needsAdditionalProducts = cms.bool(False),
393  isIgnored = cms.bool(False)
394  )
395 
def cutBasedElectronID_tools.psetPhoFull5x5SigmaIEtaIEtaCut (   wpEB,
  wpEE 
)

Definition at line 256 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

257  return cms.PSet(
258  cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
259  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
260  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
261  barrelCutOff = cms.double(ebCutOff),
262  needsAdditionalProducts = cms.bool(False),
263  isIgnored = cms.bool(False)
264  )
265 
266 # Configure the cut on dEta seed
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
def cutBasedElectronID_tools.psetPhoSCEtaMultiRangeCut ( )

Definition at line 241 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V3(), configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

242  return cms.PSet(
243  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
244  useAbsEta = cms.bool(True),
245  allowedEtaRanges = cms.VPSet(
246  cms.PSet( minEta = cms.double(0.0),
247  maxEta = cms.double(ebCutOff) ),
248  cms.PSet( minEta = cms.double(ebCutOff),
249  maxEta = cms.double(2.5) )
250  ),
251  needsAdditionalProducts = cms.bool(False),
252  isIgnored = cms.bool(False)
253  )
254 
255 # Configure the cut on full5x5 sigmaIEtaIEta
def cutBasedElectronID_tools.psetRelPFIsoScaledCut (   wpEB,
  wpEE,
  isoInputs 
)

Definition at line 412 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V5().

412 def psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs):
413  return cms.PSet(
414  cutName = cms.string('GsfEleRelPFIsoScaledCut'),
415  barrelC0 = cms.double(wpEB.relCombIsolationWithEACut_C0),
416  endcapC0 = cms.double(wpEE.relCombIsolationWithEACut_C0),
417  barrelCpt = cms.double(wpEB.relCombIsolationWithEACut_Cpt),
418  endcapCpt = cms.double(wpEE.relCombIsolationWithEACut_Cpt),
419  barrelCutOff = cms.double(ebCutOff),
420  rho = cms.InputTag("fixedGridRhoFastjetAll"),
421  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
422  needsAdditionalProducts = cms.bool(True),
423  isIgnored = cms.bool(False)
424  )
425 
426 
def psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs)
def cutBasedElectronID_tools.psetTrkPtIsoCut (   wpEB,
  wpEE 
)

Definition at line 368 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

368 def psetTrkPtIsoCut(wpEB, wpEE):
369  return cms.PSet(
370  cutName = cms.string('GsfEleTrkPtIsoCut'),
371  # Three constants for the GsfEleTrkPtIsoCut
372  # cut = constTerm if Et < slopeStart
373  # cut = slopeTerm * (Et - slopeStart) + constTerm if Et >= slopeStart
374  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
375  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
376  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
377  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
378  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
379  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
380  useHEEPIso = cms.bool(False),
381  needsAdditionalProducts = cms.bool(False),
382  isIgnored = cms.bool(False)
383  )
384 
385 # Configure GsfTrack chi2/NDOF cut

Variable Documentation

cutBasedElectronID_tools.ebCutOff

Definition at line 5 of file cutBasedElectronID_tools.py.