CMS 3D CMS Logo

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 (wpEB, wpEE, ecalIsoInputs, hcalIsoInputs)
 
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 psetDEtaInCut (wpEB, wpEE)
 
def psetDEtaInSeedCut (wpEB, wpEE)
 
def psetDPhiInCut (wpEB, wpEE)
 
def psetEcalPFClusterIsoCut (wpEB, wpEE, ecalIsoInputs)
 
def psetEffAreaPFIsoCut (wpEB, wpEE, isoInputs)
 
def psetEInerseMinusPInverseCut (wpEB, wpEE)
 
def psetFull5x5SigmaIEtaIEtaCut (wpEB, wpEE)
 
def psetGsfEleDxyCut (wpEB, wpEE)
 
def psetGsfEleDzCut (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 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 573 of file cutBasedElectronID_tools.py.

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

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

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

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

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

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

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

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

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

Definition at line 398 of file cutBasedElectronID_tools.py.

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

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

Definition at line 238 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V2().

238 def psetDEtaInCut(wpEB, wpEE):
239  return cms.PSet(
240  cutName = cms.string('GsfEleEBEECut'),
241  cutString = cms.string("abs(deltaEtaSuperClusterTrackAtVtx)"),
242  cutValueEB = cms.double( wpEB.dEtaInCut ),
243  cutValueEE = cms.double( wpEE.dEtaInCut ),
244  needsAdditionalProducts = cms.bool(False),
245  isIgnored = cms.bool(False)
246  )
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().

225 def psetDEtaInSeedCut(wpEB, wpEE):
226  valid_cut_condition = "? superCluster.isNonnull && superCluster.seed.isNonnull ?"
227  actual_cut_string = "abs(deltaEtaSuperClusterTrackAtVtx - superCluster.eta + superCluster.seed.eta)"
228  return cms.PSet(
229  cutName = cms.string('GsfEleEBEECut'),
230  cutString = cms.string(valid_cut_condition + actual_cut_string + " : 999999."),
231  cutValueEB = cms.double( wpEB.dEtaInSeedCut ),
232  cutValueEE = cms.double( wpEE.dEtaInSeedCut ),
233  needsAdditionalProducts = cms.bool(False),
234  isIgnored = cms.bool(False)
235  )
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().

249 def psetDPhiInCut(wpEB, wpEE):
250  return cms.PSet(
251  cutName = cms.string('GsfEleEBEECut'),
252  cutString = cms.string("abs(deltaPhiSuperClusterTrackAtVtx)"),
253  cutValueEB = cms.double( wpEB.dPhiInCut ),
254  cutValueEE = cms.double( wpEE.dPhiInCut ),
255  needsAdditionalProducts = cms.bool(False),
256  isIgnored = cms.bool(False)
257  )
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().

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

367 def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs):
368  return cms.PSet(
369  cutName = cms.string('GsfEleEffAreaPFIsoCut'),
370  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
371  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
372  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
373  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
374  isRelativeIso = cms.bool(True),
375  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
376  barrelCutOff = cms.double(ebCutOff),
377  rho = cms.InputTag("fixedGridRhoFastjetAll"),
378  effAreasConfigFile = cms.FileInPath( isoInputs ),
379  needsAdditionalProducts = cms.bool(True),
380  isIgnored = cms.bool(False)
381  )
382 
def psetEffAreaPFIsoCut(wpEB, wpEE, isoInputs)
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  return cms.PSet(
290  cutName = cms.string('GsfEleEBEECut'),
291  cutString = cms.string("abs(1. - eSuperClusterOverP) / ecalEnergy"),
292  cutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
293  cutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
294  needsAdditionalProducts = cms.bool(False),
295  isIgnored = cms.bool(False)
296  )
297 
298 # Configure ECAL PF Cluster isolation cut. Note that this cut requires
299 # 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  return cms.PSet(
216  cutName = cms.string('GsfEleEBEECut'),
217  cutString = cms.string("full5x5_sigmaIetaIeta"),
218  cutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
219  cutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
220  needsAdditionalProducts = cms.bool(False),
221  isIgnored = cms.bool(False)
222  )
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().

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

Definition at line 428 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleID_V2().

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

260 def psetHadronicOverEMCut(wpEB, wpEE):
261  return cms.PSet(
262  cutName = cms.string('GsfEleEBEECut'),
263  cutString = cms.string("hadronicOverEm"),
264  cutValueEB = cms.double( wpEB.hOverECut ),
265  cutValueEE = cms.double( wpEE.hOverECut ),
266  needsAdditionalProducts = cms.bool(False),
267  isIgnored = cms.bool(False)
268  )
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  return cms.PSet(
273  cutName = cms.string('GsfEleHadronicOverEMEnergyScaledCut'),
274  barrelC0 = cms.double( wpEB.hOverECut_C0 ),
275  barrelCE = cms.double( wpEB.hOverECut_CE ),
276  barrelCr = cms.double( wpEB.hOverECut_Cr ),
277  endcapC0 = cms.double( wpEE.hOverECut_C0 ),
278  endcapCE = cms.double( wpEE.hOverECut_CE ),
279  endcapCr = cms.double( wpEE.hOverECut_Cr ),
280  rho = cms.InputTag("fixedGridRhoFastjetAll"),
281  barrelCutOff = cms.double(ebCutOff),
282  needsAdditionalProducts = cms.bool(True),
283  isIgnored = cms.bool(False)
284  )
285 
286 
287 # Configure |1/E-1/p| cut
def psetHadronicOverEMEnergyScaledCut(wpEB, wpEE)
def cutBasedElectronID_tools.psetHcalPFClusterIsoCut (   wpEB,
  wpEE,
  hcalIsoInputs 
)

Definition at line 320 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

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

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

Definition at line 357 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

357 def psetNormalizedGsfChi2Cut(wpEB, wpEE):
358  return cms.PSet(
359  cutName = cms.string('GsfEleEBEECut'),
360  cutString = cms.string("? gsfTrack.isNonnull ? gsfTrack.normalizedChi2 : 999990."),
361  cutValueEB = cms.double( wpEB.normalizedGsfChi2Cut ),
362  cutValueEE = cms.double( wpEE.normalizedGsfChi2Cut ),
363  needsAdditionalProducts = cms.bool(False),
364  isIgnored = cms.bool(False)
365  )
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().

200  return cms.PSet(
201  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
202  useAbsEta = cms.bool(True),
203  allowedEtaRanges = cms.VPSet(
204  cms.PSet( minEta = cms.double(0.0),
205  maxEta = cms.double(ebCutOff) ),
206  cms.PSet( minEta = cms.double(ebCutOff),
207  maxEta = cms.double(2.5) )
208  ),
209  needsAdditionalProducts = cms.bool(False),
210  isIgnored = cms.bool(False)
211  )
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().

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

Definition at line 339 of file cutBasedElectronID_tools.py.

Referenced by configureVIDCutBasedEleHLTPreselection_V1().

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

Variable Documentation

cutBasedElectronID_tools.ebCutOff

Definition at line 5 of file cutBasedElectronID_tools.py.