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

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

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

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

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

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

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

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

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

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

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

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

427  return cms.PSet(
428  cutName = cms.string('GsfEleConversionVetoCut'),
429  conversionSrc = cms.InputTag('allConversions'),
430  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
431  beamspotSrc = cms.InputTag('offlineBeamSpot'),
432  needsAdditionalProducts = cms.bool(True),
433  isIgnored = cms.bool(False)
434  )
435 
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 395 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V3(), and configureVIDCutBasedEleID_V4().

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

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

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

Definition at line 385 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

385 def psetNormalizedGsfChi2Cut(wpEB, wpEE):
386  return cms.PSet(
387  cutName = cms.string('GsfEleNormalizedGsfChi2Cut'),
388  normalizedGsfChi2CutValueEB = cms.double( wpEB.normalizedGsfChi2Cut ),
389  normalizedGsfChi2CutValueEE = cms.double( wpEE.normalizedGsfChi2Cut ),
390  barrelCutOff = cms.double(ebCutOff),
391  needsAdditionalProducts = cms.bool(False),
392  isIgnored = cms.bool(False)
393  )
394 
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 411 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V5().

411 def psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs):
412  return cms.PSet(
413  cutName = cms.string('GsfEleRelPFIsoScaledCut'),
414  barrelC0 = cms.double(wpEB.relCombIsolationWithEACut_C0),
415  endcapC0 = cms.double(wpEE.relCombIsolationWithEACut_C0),
416  barrelCpt = cms.double(wpEB.relCombIsolationWithEACut_Cpt),
417  endcapCpt = cms.double(wpEE.relCombIsolationWithEACut_Cpt),
418  barrelCutOff = cms.double(ebCutOff),
419  rho = cms.InputTag("fixedGridRhoFastjetAll"),
420  effAreasConfigFile = cms.FileInPath( isoInputs.isoEffAreas ),
421  needsAdditionalProducts = cms.bool(True),
422  isIgnored = cms.bool(False)
423  )
424 
425 
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  needsAdditionalProducts = cms.bool(False),
381  isIgnored = cms.bool(False)
382  )
383 
384 # Configure GsfTrack chi2/NDOF cut

Variable Documentation

cutBasedElectronID_tools.ebCutOff

Definition at line 5 of file cutBasedElectronID_tools.py.