CMS 3D CMS Logo

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

Classes

class  EleHLTSelection_V1
 
class  EleWorkingPoint_V2
 
class  EleWorkingPoint_V3
 
class  EleWorkingPoint_V4
 
class  EleWorkingPoint_V5
 

Functions

def configureVIDCutBasedEleHLTPreselection_V1
 
def configureVIDCutBasedEleID_V2
 
def configureVIDCutBasedEleID_V3
 
def configureVIDCutBasedEleID_V4
 
def configureVIDCutBasedEleID_V5
 
def psetConversionVetoCut
 
def psetDEtaInCut
 
def psetDEtaInSeedCut
 
def psetDPhiInCut
 
def psetEcalPFClusterIsoCut
 
def psetEffAreaPFIsoCut
 
def psetEInerseMinusPInverseCut
 
def psetFull5x5SigmaIEtaIEtaCut
 
def psetGsfEleDxyCut
 
def psetGsfEleDzCut
 
def psetHadronicOverEMCut
 
def psetHadronicOverEMEnergyScaledCut
 
def psetHcalPFClusterIsoCut
 
def psetMinPtCut
 
def psetMissingHitsCut
 
def psetNormalizedGsfChi2Cut
 
def psetPhoSCEtaMultiRangeCut
 
def psetRelPFIsoScaledCut
 
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 573 of file cutBasedElectronID_tools.py.

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

574 def configureVIDCutBasedEleHLTPreselection_V1( wpEB, wpEE, ecalIsoInputs, hcalIsoInputs ):
575  """
576  This function configures the full cms.PSet for a VID ID and returns it.
577  The inputs: two objects of the type EleHLTSelection_V1, one
578  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
579  The third and fourth arguments are objects that contain information necessary
580  for isolation calculations for ECAL and HCAL.
581  """
582  # print "VID: Configuring cut set %s" % wpEB.idName
583  parameterSet = cms.PSet(
584  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
585  cutFlow = cms.VPSet(
586  psetMinPtCut(), # min pt cut
587  psetPhoSCEtaMultiRangeCut(), # eta cut
588  psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
589  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
590  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
591  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
592  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
593  psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs), # ECAL PF Cluster isolation
594  psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs), # HCAL PF Cluster isolation
595  psetTrkPtIsoCut(wpEB, wpEE), # tracker isolation cut
596  psetNormalizedGsfChi2Cut(wpEB, wpEE) # GsfTrack chi2/NDOF cut
597  )
598  )
599  #
600  return parameterSet
601 
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 445 of file cutBasedElectronID_tools.py.

References psetConversionVetoCut(), psetDEtaInCut(), psetDPhiInCut(), psetEffAreaPFIsoCut(), psetEInerseMinusPInverseCut(), psetFull5x5SigmaIEtaIEtaCut(), psetGsfEleDxyCut(), psetGsfEleDzCut(), psetHadronicOverEMCut(), psetMinPtCut(), psetMissingHitsCut(), and psetPhoSCEtaMultiRangeCut().

446 def configureVIDCutBasedEleID_V2( wpEB, wpEE, isoInputs ):
447  """
448  This function configures the full cms.PSet for a VID ID and returns it.
449  The inputs: two objects of the type WorkingPoint_V2, one
450  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
451  The third argument is an object that contains information necessary
452  for isolation calculations.
453  """
454  # print "VID: Configuring cut set %s" % wpEB.idName
455  parameterSet = cms.PSet(
456  #
457  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
458  cutFlow = cms.VPSet(
459  psetMinPtCut(),
461  psetDEtaInCut(wpEB, wpEE),
462  psetDPhiInCut(wpEB, wpEE),
463  psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE),
464  psetHadronicOverEMCut(wpEB, wpEE),
465  psetGsfEleDxyCut(wpEB, wpEE),
466  psetGsfEleDzCut(wpEB, wpEE),
467  psetEInerseMinusPInverseCut(wpEB, wpEE),
468  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs),
470  psetMissingHitsCut(wpEB, wpEE)
471  )
472  )
473  #
474  return parameterSet
475 
476 
477 # ==============================================================
478 # Define the complete cut sets
479 # ==============================================================
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 480 of file cutBasedElectronID_tools.py.

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

481 def configureVIDCutBasedEleID_V3( wpEB, wpEE, isoInputs ):
482  """
483  This function configures the full cms.PSet for a VID ID and returns it.
484  The inputs: two objects of the type WorkingPoint_V3, one
485  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
486  The third argument is an object that contains information necessary
487  for isolation calculations.
488  In this version, the impact parameter cuts dxy and dz are not present
489  """
490  # print "VID: Configuring cut set %s" % wpEB.idName
491  parameterSet = cms.PSet(
492  #
493  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
494  cutFlow = cms.VPSet(
495  psetMinPtCut(),
496  psetPhoSCEtaMultiRangeCut(), # eta cut
497  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
498  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
499  psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
500  psetHadronicOverEMCut(wpEB, wpEE), # H/E cut
501  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
502  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
504  psetMissingHitsCut(wpEB, wpEE)
505  )
506  )
507  #
508  return parameterSet
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 509 of file cutBasedElectronID_tools.py.

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

510 def configureVIDCutBasedEleID_V4( wpEB, wpEE, isoInputs ):
511  """
512  This function configures the full cms.PSet for a VID ID and returns it.
513  The inputs: two objects of the type WorkingPoint_V3, one
514  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
515  The third argument is an object that contains information necessary
516  for isolation calculations.
517  In this version, the energy and pileup dependent hOverE is introduced
518  """
519  # print "VID: Configuring cut set %s" % wpEB.idName
520  parameterSet = cms.PSet(
521  #
522  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
523  cutFlow = cms.VPSet(
524  psetMinPtCut(),
525  psetPhoSCEtaMultiRangeCut(), # eta cut
526  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
527  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
528  psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
529  psetHadronicOverEMEnergyScaledCut(wpEB, wpEE), # H/E cut
530  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
531  psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
533  psetMissingHitsCut(wpEB, wpEE)
534  )
535  )
536  #
537  return parameterSet
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 538 of file cutBasedElectronID_tools.py.

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

539 def configureVIDCutBasedEleID_V5( wpEB, wpEE, isoInputs ):
540  """
541  This function configures the full cms.PSet for a VID ID and returns it.
542  The inputs: two objects of the type WorkingPoint_V3, one
543  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
544  The third argument is an object that contains information necessary
545  for isolation calculations.
546  In this version, the pt dependent isolation is introduced
547  """
548  # print "VID: Configuring cut set %s" % wpEB.idName
549  parameterSet = cms.PSet(
550  #
551  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
552  cutFlow = cms.VPSet(
553  psetMinPtCut(),
554  psetPhoSCEtaMultiRangeCut(), # eta cut
555  psetDEtaInSeedCut(wpEB, wpEE), # dEtaIn seed cut
556  psetDPhiInCut(wpEB, wpEE), # dPhiIn cut
557  psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE), # full 5x5 sigmaIEtaIEta cut
558  psetHadronicOverEMEnergyScaledCut(wpEB, wpEE), # H/E cut
559  psetEInerseMinusPInverseCut(wpEB, wpEE), # |1/e-1/p| cut
560  psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs), # rel. comb. PF isolation cut
562  psetMissingHitsCut(wpEB, wpEE)
563  )
564  )
565  #
566  return parameterSet
567 
568 
569 # -----------------------------
570 # HLT-safe common definitions
571 # -----------------------------
572 
def cutBasedElectronID_tools.psetConversionVetoCut ( )

Definition at line 398 of file cutBasedElectronID_tools.py.

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

400  return cms.PSet(
401  cutName = cms.string('GsfEleConversionVetoCut'),
402  conversionSrc = cms.InputTag('allConversions'),
403  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
404  beamspotSrc = cms.InputTag('offlineBeamSpot'),
405  needsAdditionalProducts = cms.bool(True),
406  isIgnored = cms.bool(False)
407  )
def cutBasedElectronID_tools.psetDEtaInCut (   wpEB,
  wpEE 
)

Definition at line 238 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V2().

239 def psetDEtaInCut(wpEB, wpEE):
240  return cms.PSet(
241  cutName = cms.string('GsfEleEBEECut'),
242  cutString = cms.string("abs(deltaEtaSuperClusterTrackAtVtx)"),
243  cutValueEB = cms.double( wpEB.dEtaInCut ),
244  cutValueEE = cms.double( wpEE.dEtaInCut ),
245  needsAdditionalProducts = cms.bool(False),
246  isIgnored = cms.bool(False)
247  )
248 
# Configure dPhiIn cut
def cutBasedElectronID_tools.psetDEtaInSeedCut (   wpEB,
  wpEE 
)

Definition at line 225 of file cutBasedElectronID_tools.py.

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

226 def psetDEtaInSeedCut(wpEB, wpEE):
227  valid_cut_condition = "? superCluster.isNonnull && superCluster.seed.isNonnull ?"
228  actual_cut_string = "abs(deltaEtaSuperClusterTrackAtVtx - superCluster.eta + superCluster.seed.eta)"
229  return cms.PSet(
230  cutName = cms.string('GsfEleEBEECut'),
231  cutString = cms.string(valid_cut_condition + actual_cut_string + " : 999999."),
232  cutValueEB = cms.double( wpEB.dEtaInSeedCut ),
233  cutValueEE = cms.double( wpEE.dEtaInSeedCut ),
234  needsAdditionalProducts = cms.bool(False),
235  isIgnored = cms.bool(False)
236  )
237 
# Configure dEtaIn cut
def cutBasedElectronID_tools.psetDPhiInCut (   wpEB,
  wpEE 
)

Definition at line 249 of file cutBasedElectronID_tools.py.

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

250 def psetDPhiInCut(wpEB, wpEE):
251  return cms.PSet(
252  cutName = cms.string('GsfEleEBEECut'),
253  cutString = cms.string("abs(deltaPhiSuperClusterTrackAtVtx)"),
254  cutValueEB = cms.double( wpEB.dPhiInCut ),
255  cutValueEE = cms.double( wpEE.dPhiInCut ),
256  needsAdditionalProducts = cms.bool(False),
257  isIgnored = cms.bool(False)
258  )
259 
# Configure H/E cut
def cutBasedElectronID_tools.psetEcalPFClusterIsoCut (   wpEB,
  wpEE,
  ecalIsoInputs 
)

Definition at line 300 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

301 def psetEcalPFClusterIsoCut(wpEB, wpEE, ecalIsoInputs):
302  return cms.PSet(
303  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
304  isoType = cms.int32( 0 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
305  isoCutEBLowPt = cms.double( wpEB.ecalPFClusterIsoLowPtCut ),
306  isoCutEBHighPt = cms.double( wpEB.ecalPFClusterIsoHighPtCut ),
307  isoCutEELowPt = cms.double( wpEE.ecalPFClusterIsoLowPtCut ),
308  isoCutEEHighPt = cms.double( wpEE.ecalPFClusterIsoHighPtCut ),
309  isRelativeIso = cms.bool(True),
310  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
311  barrelCutOff = cms.double(ebCutOff),
312  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
313  # while HLT uses ...AllCalo
314  effAreasConfigFile = cms.FileInPath( ecalIsoInputs ),
315  needsAdditionalProducts = cms.bool(True),
316  isIgnored = cms.bool(False)
317  )
318 
319 # 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 367 of file cutBasedElectronID_tools.py.

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

368 def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs):
369  return cms.PSet(
370  cutName = cms.string('GsfEleEffAreaPFIsoCut'),
371  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
372  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
373  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
374  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
375  isRelativeIso = cms.bool(True),
376  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
377  barrelCutOff = cms.double(ebCutOff),
378  rho = cms.InputTag("fixedGridRhoFastjetAll"),
379  effAreasConfigFile = cms.FileInPath( isoInputs ),
380  needsAdditionalProducts = cms.bool(True),
381  isIgnored = cms.bool(False)
382  )
def cutBasedElectronID_tools.psetEInerseMinusPInverseCut (   wpEB,
  wpEE 
)

Definition at line 288 of file cutBasedElectronID_tools.py.

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

289 def psetEInerseMinusPInverseCut(wpEB, wpEE):
290  return cms.PSet(
291  cutName = cms.string('GsfEleEBEECut'),
292  cutString = cms.string("abs(1. - eSuperClusterOverP) / ecalEnergy"),
293  cutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
294  cutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
295  needsAdditionalProducts = cms.bool(False),
296  isIgnored = cms.bool(False)
297  )
298 
299 # Configure ECAL PF Cluster isolation cut. Note that this cut requires
# effective area constants file as input
def cutBasedElectronID_tools.psetFull5x5SigmaIEtaIEtaCut (   wpEB,
  wpEE 
)

Definition at line 214 of file cutBasedElectronID_tools.py.

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

215 def psetFull5x5SigmaIEtaIEtaCut(wpEB, wpEE):
216  return cms.PSet(
217  cutName = cms.string('GsfEleEBEECut'),
218  cutString = cms.string("full5x5_sigmaIetaIeta"),
219  cutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
220  cutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
221  needsAdditionalProducts = cms.bool(False),
222  isIgnored = cms.bool(False)
223  )
224 
# Configure the cut on dEta seed
def cutBasedElectronID_tools.psetGsfEleDxyCut (   wpEB,
  wpEE 
)

Definition at line 418 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V2().

419 def psetGsfEleDxyCut(wpEB, wpEE):
420  return cms.PSet( cutName = cms.string('GsfEleDxyCut'),
421  dxyCutValueEB = cms.double( wpEB.dxyCut ),
422  dxyCutValueEE = cms.double( wpEE.dxyCut ),
423  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
424  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
425  barrelCutOff = cms.double(ebCutOff),
426  needsAdditionalProducts = cms.bool(True),
427  isIgnored = cms.bool(False))
def cutBasedElectronID_tools.psetGsfEleDzCut (   wpEB,
  wpEE 
)

Definition at line 428 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V2().

429 def psetGsfEleDzCut(wpEB, wpEE):
430  return cms.PSet( cutName = cms.string('GsfEleDzCut'),
431  dzCutValueEB = cms.double( wpEB.dzCut ),
432  dzCutValueEE = cms.double( wpEE.dzCut ),
433  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
434  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
435  barrelCutOff = cms.double(ebCutOff),
436  needsAdditionalProducts = cms.bool(True),
437  isIgnored = cms.bool(False))
438 
439 # -----------------------------
440 # Version V2 common definitions
441 # -----------------------------
442 
443 # This cut set definition is in the old style, with everything configured
444 # in one go. It is kept to minimize changes. New definitions should use
# PSets defined above instead.
def cutBasedElectronID_tools.psetHadronicOverEMCut (   wpEB,
  wpEE 
)

Definition at line 260 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1(), configureVIDCutBasedEleID_V2(), and configureVIDCutBasedEleID_V3().

261 def psetHadronicOverEMCut(wpEB, wpEE):
262  return cms.PSet(
263  cutName = cms.string('GsfEleEBEECut'),
264  cutString = cms.string("hadronicOverEm"),
265  cutValueEB = cms.double( wpEB.hOverECut ),
266  cutValueEE = cms.double( wpEE.hOverECut ),
267  needsAdditionalProducts = cms.bool(False),
268  isIgnored = cms.bool(False)
269  )
270 
# Configure energy and pileup dependent H/E cut
def cutBasedElectronID_tools.psetHadronicOverEMEnergyScaledCut (   wpEB,
  wpEE 
)

Definition at line 271 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V4(), and configureVIDCutBasedEleID_V5().

272 def psetHadronicOverEMEnergyScaledCut(wpEB, wpEE):
273  return cms.PSet(
274  cutName = cms.string('GsfEleHadronicOverEMEnergyScaledCut'),
275  barrelC0 = cms.double( wpEB.hOverECut_C0 ),
276  barrelCE = cms.double( wpEB.hOverECut_CE ),
277  barrelCr = cms.double( wpEB.hOverECut_Cr ),
278  endcapC0 = cms.double( wpEE.hOverECut_C0 ),
279  endcapCE = cms.double( wpEE.hOverECut_CE ),
280  endcapCr = cms.double( wpEE.hOverECut_Cr ),
281  rho = cms.InputTag("fixedGridRhoFastjetAll"),
282  barrelCutOff = cms.double(ebCutOff),
283  needsAdditionalProducts = cms.bool(True),
284  isIgnored = cms.bool(False)
285  )
286 
287 
# Configure |1/E-1/p| cut
def cutBasedElectronID_tools.psetHcalPFClusterIsoCut (   wpEB,
  wpEE,
  hcalIsoInputs 
)

Definition at line 320 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

321 def psetHcalPFClusterIsoCut(wpEB, wpEE, hcalIsoInputs):
322  return cms.PSet(
323  cutName = cms.string('GsfEleCalPFClusterIsoCut'),
324  isoType = cms.int32( 1 ), # ECAL = 0, HCAL = 1, see cut class header for IsoType enum
325  isoCutEBLowPt = cms.double( wpEB.hcalPFClusterIsoLowPtCut ),
326  isoCutEBHighPt = cms.double( wpEB.hcalPFClusterIsoHighPtCut ),
327  isoCutEELowPt = cms.double( wpEE.hcalPFClusterIsoLowPtCut ),
328  isoCutEEHighPt = cms.double( wpEE.hcalPFClusterIsoHighPtCut ),
329  isRelativeIso = cms.bool(True),
330  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
331  barrelCutOff = cms.double(ebCutOff),
332  rho = cms.InputTag("fixedGridRhoFastjetCentralCalo"), # This rho is best for emulation
333  # while HLT uses ...AllCalo
334  effAreasConfigFile = cms.FileInPath( hcalIsoInputs ),
335  needsAdditionalProducts = cms.bool(True),
336  isIgnored = cms.bool(False)
337  )
338 
# Configure tracker isolation cut
def cutBasedElectronID_tools.psetMinPtCut ( )

Definition at line 190 of file cutBasedElectronID_tools.py.

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

191 def psetMinPtCut():
192  return cms.PSet(
193  cutName = cms.string("MinPtCut"),
194  minPt = cms.double(5.0),
195  needsAdditionalProducts = cms.bool(False),
196  isIgnored = cms.bool(False)
197  )
198 
# Take all particles in the eta ranges 0-ebCutOff and ebCutOff-2.5
def cutBasedElectronID_tools.psetMissingHitsCut (   wpEB,
  wpEE 
)

Definition at line 408 of file cutBasedElectronID_tools.py.

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

409 def psetMissingHitsCut(wpEB, wpEE):
410  return cms.PSet(
411  cutName = cms.string('GsfEleMissingHitsCut'),
412  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
413  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
414  barrelCutOff = cms.double(ebCutOff),
415  needsAdditionalProducts = cms.bool(False),
416  isIgnored = cms.bool(False)
417  )
def cutBasedElectronID_tools.psetNormalizedGsfChi2Cut (   wpEB,
  wpEE 
)

Definition at line 357 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

358 def psetNormalizedGsfChi2Cut(wpEB, wpEE):
359  return cms.PSet(
360  cutName = cms.string('GsfEleEBEECut'),
361  cutString = cms.string("? gsfTrack.isNonnull ? gsfTrack.normalizedChi2 : 999990."),
362  cutValueEB = cms.double( wpEB.normalizedGsfChi2Cut ),
363  cutValueEE = cms.double( wpEE.normalizedGsfChi2Cut ),
364  needsAdditionalProducts = cms.bool(False),
365  isIgnored = cms.bool(False)
366  )
def cutBasedElectronID_tools.psetPhoSCEtaMultiRangeCut ( )

Definition at line 199 of file cutBasedElectronID_tools.py.

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

201  return cms.PSet(
202  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
203  useAbsEta = cms.bool(True),
204  allowedEtaRanges = cms.VPSet(
205  cms.PSet( minEta = cms.double(0.0),
206  maxEta = cms.double(ebCutOff) ),
207  cms.PSet( minEta = cms.double(ebCutOff),
208  maxEta = cms.double(2.5) )
209  ),
210  needsAdditionalProducts = cms.bool(False),
211  isIgnored = cms.bool(False)
212  )
213 
# Configure the cut on full5x5 sigmaIEtaIEta
def cutBasedElectronID_tools.psetRelPFIsoScaledCut (   wpEB,
  wpEE,
  isoInputs 
)

Definition at line 383 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V5().

384 def psetRelPFIsoScaledCut(wpEB, wpEE, isoInputs):
385  return cms.PSet(
386  cutName = cms.string('GsfEleRelPFIsoScaledCut'),
387  barrelC0 = cms.double(wpEB.relCombIsolationWithEACut_C0),
388  endcapC0 = cms.double(wpEE.relCombIsolationWithEACut_C0),
389  barrelCpt = cms.double(wpEB.relCombIsolationWithEACut_Cpt),
390  endcapCpt = cms.double(wpEE.relCombIsolationWithEACut_Cpt),
391  barrelCutOff = cms.double(ebCutOff),
392  rho = cms.InputTag("fixedGridRhoFastjetAll"),
393  effAreasConfigFile = cms.FileInPath( isoInputs ),
394  needsAdditionalProducts = cms.bool(True),
395  isIgnored = cms.bool(False)
396  )
397 
def cutBasedElectronID_tools.psetTrkPtIsoCut (   wpEB,
  wpEE 
)

Definition at line 339 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

340 def psetTrkPtIsoCut(wpEB, wpEE):
341  return cms.PSet(
342  cutName = cms.string('GsfEleTrkPtIsoCut'),
343  # Three constants for the GsfEleTrkPtIsoCut
344  # cut = constTerm if Et < slopeStart
345  # cut = slopeTerm * (Et - slopeStart) + constTerm if Et >= slopeStart
346  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
347  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
348  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
349  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
350  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
351  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
352  useHEEPIso = cms.bool(False),
353  needsAdditionalProducts = cms.bool(False),
354  isIgnored = cms.bool(False)
355  )
356 
# Configure GsfTrack chi2/NDOF cut

Variable Documentation

float cutBasedElectronID_tools.ebCutOff = 1.479

Definition at line 5 of file cutBasedElectronID_tools.py.