CMS 3D CMS Logo

Classes | Functions | Variables
cutBasedPhotonID_tools Namespace Reference

Classes

class  ClusterIsolationCutInputs
 
class  HoverECutInputs
 
class  IsolationCutInputs
 
class  WorkingPoint_V1
 
class  WorkingPoint_V2
 
class  WorkingPoint_V3
 

Functions

def configureVIDCutBasedPhoID_V1 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedPhoID_V2 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedPhoID_V3 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedPhoID_V4 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedPhoID_V5 (wpEB, wpEE, isoInputs)
 
def configureVIDCutBasedPhoID_V6 (wpEB, wpEE, isoInputs, clusterIsoInputs, hOverEInputs)
 
def psetChgHadIsoWithEAQuadScalingCut (wpEB, wpEE, isoInputs)
 
def psetChHadIsoWithEALinScalingCut (wpEB, wpEE, isoInputs)
 
def psetECalClusIsoWithEAQuadScalingCut (wpEB, wpEE, clusterIsoInputs)
 
def psetHCalClusIsoWithEAQuadScalingCut (wpEB, wpEE, clusterIsoInputs)
 
def psetMinPtCut ()
 
def psetNeuHadIsoWithEAExpoScalingCut (wpEB, wpEE, isoInputs)
 
def psetNeuHadIsoWithEAExpoScalingEBCut (wpEB, wpEE, isoInputs)
 
def psetNeuHadIsoWithEALinScalingCut (wpEB, wpEE, isoInputs)
 
def psetNeuHadIsoWithEAQuadScalingCut (wpEB, wpEE, isoInputs)
 
def psetPhoFull5x5SigmaIEtaIEtaCut (wpEB, wpEE)
 
def psetPhoFull5x5SigmaIEtaIEtaValueMapCut (wpEB, wpEE)
 
def psetPhoHcalOverEcalBcCut (wpEB, wpEE)
 
def psetPhoHcalOverEcalWithEACut (wpEB, wpEE, hOverEInputs)
 
def psetPhoIsoWithEALinScalingCut (wpEB, wpEE, isoInputs)
 
def psetPhoSCEtaMultiRangeCut ()
 

Variables

 ebCutOff
 

Function Documentation

◆ configureVIDCutBasedPhoID_V1()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V1 (   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_V1, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

Definition at line 498 of file cutBasedPhotonID_tools.py.

References psetChHadIsoWithEALinScalingCut(), psetMinPtCut(), psetNeuHadIsoWithEALinScalingCut(), psetPhoFull5x5SigmaIEtaIEtaValueMapCut(), psetPhoHcalOverEcalBcCut(), psetPhoIsoWithEALinScalingCut(), and psetPhoSCEtaMultiRangeCut().

498 def configureVIDCutBasedPhoID_V1( wpEB, wpEE, isoInputs ):
499  """
500  This function configures the full cms.PSet for a VID ID and returns it.
501  The inputs: two objects of the type WorkingPoint_V1, one
502  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
503  The third argument contains data for isolation calculation.
504  """
505  # print "VID: Configuring cut set %s" % wpEB.idName
506  parameterSet = cms.PSet(
507  #
508  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
509  cutFlow = cms.VPSet(
510  psetMinPtCut(), # pt cut
511  psetPhoSCEtaMultiRangeCut(), # eta cut
512  psetPhoHcalOverEcalBcCut(wpEB,wpEE), # H/E cut
513  psetPhoFull5x5SigmaIEtaIEtaValueMapCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
514  psetChHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
515  psetNeuHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # neutral hadron isolation cut
516  psetPhoIsoWithEALinScalingCut(wpEB,wpEE,isoInputs) # photon isolation cut
517  )
518  )
519  #
520  return parameterSet
521 
def configureVIDCutBasedPhoID_V1(wpEB, wpEE, isoInputs)
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)
def psetPhoFull5x5SigmaIEtaIEtaValueMapCut(wpEB, wpEE)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetNeuHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)

◆ configureVIDCutBasedPhoID_V2()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V2 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: first object is of the type WorkingPoint_V2, second object
is of the type WorkingPoint_V1, containing the cuts for the Barrel (EB) 
and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

The V2 with respect to V1 has one change: the neutral hadron isolation
cut has an exponential pt scaling for the barrel.

Definition at line 522 of file cutBasedPhotonID_tools.py.

References psetChHadIsoWithEALinScalingCut(), psetMinPtCut(), psetNeuHadIsoWithEAExpoScalingEBCut(), psetPhoFull5x5SigmaIEtaIEtaValueMapCut(), psetPhoHcalOverEcalBcCut(), psetPhoIsoWithEALinScalingCut(), and psetPhoSCEtaMultiRangeCut().

522 def configureVIDCutBasedPhoID_V2( wpEB, wpEE, isoInputs ):
523  """
524  This function configures the full cms.PSet for a VID ID and returns it.
525  The inputs: first object is of the type WorkingPoint_V2, second object
526  is of the type WorkingPoint_V1, containing the cuts for the Barrel (EB)
527  and the other one for the Endcap (EE).
528  The third argument contains data for isolation calculation.
529 
530  The V2 with respect to V1 has one change: the neutral hadron isolation
531  cut has an exponential pt scaling for the barrel.
532  """
533  # print "VID: Configuring cut set %s" % wpEB.idName
534  parameterSet = cms.PSet(
535  #
536  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
537  cutFlow = cms.VPSet(
538  psetMinPtCut(), # pt cut
539  psetPhoSCEtaMultiRangeCut(), # eta cut
540  psetPhoHcalOverEcalBcCut(wpEB,wpEE), # H/E cut
541  psetPhoFull5x5SigmaIEtaIEtaValueMapCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
542  psetChHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
543  psetNeuHadIsoWithEAExpoScalingEBCut(wpEB,wpEE,isoInputs), # neutral hadron isolation cut
544  psetPhoIsoWithEALinScalingCut(wpEB,wpEE,isoInputs) # photon isolation cut
545  )
546  )
547  #
548  return parameterSet
549 
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)
def psetPhoFull5x5SigmaIEtaIEtaValueMapCut(wpEB, wpEE)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetNeuHadIsoWithEAExpoScalingEBCut(wpEB, wpEE, isoInputs)
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def configureVIDCutBasedPhoID_V2(wpEB, wpEE, isoInputs)

◆ configureVIDCutBasedPhoID_V3()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V3 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: first object is of the type WorkingPoint_V2, second object
is of the type WorkingPoint_V1, containing the cuts for the Barrel (EB) 
and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

The V3 with respect to V2 has one change: the full5x5 sigmaIEtaIEta
is taken from the native reco::Photon method and not from a ValueMap
produced upstream by some producer module.

Definition at line 550 of file cutBasedPhotonID_tools.py.

References psetChHadIsoWithEALinScalingCut(), psetMinPtCut(), psetNeuHadIsoWithEAExpoScalingEBCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoHcalOverEcalBcCut(), psetPhoIsoWithEALinScalingCut(), and psetPhoSCEtaMultiRangeCut().

550 def configureVIDCutBasedPhoID_V3( wpEB, wpEE, isoInputs ):
551  """
552  This function configures the full cms.PSet for a VID ID and returns it.
553  The inputs: first object is of the type WorkingPoint_V2, second object
554  is of the type WorkingPoint_V1, containing the cuts for the Barrel (EB)
555  and the other one for the Endcap (EE).
556  The third argument contains data for isolation calculation.
557 
558  The V3 with respect to V2 has one change: the full5x5 sigmaIEtaIEta
559  is taken from the native reco::Photon method and not from a ValueMap
560  produced upstream by some producer module.
561  """
562  # print "VID: Configuring cut set %s" % wpEB.idName
563  parameterSet = cms.PSet(
564  #
565  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
566  cutFlow = cms.VPSet(
567  psetMinPtCut(), # pt cut
568  psetPhoSCEtaMultiRangeCut(), # eta cut
569  psetPhoHcalOverEcalBcCut(wpEB,wpEE), # H/E cut
570  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
571  psetChHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
572  psetNeuHadIsoWithEAExpoScalingEBCut(wpEB,wpEE,isoInputs), # neutral hadron isolation cut
573  psetPhoIsoWithEALinScalingCut(wpEB,wpEE,isoInputs) # photon isolation cut
574  )
575  )
576  #
577  return parameterSet
578 
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)
def configureVIDCutBasedPhoID_V3(wpEB, wpEE, isoInputs)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetNeuHadIsoWithEAExpoScalingEBCut(wpEB, wpEE, isoInputs)
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)

◆ configureVIDCutBasedPhoID_V4()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V4 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: first object is of the type WorkingPoint_V2, second object
is of the type WorkingPoint_V2 as well, first containing the cuts for the 
Barrel (EB) and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

The V4 with respect to V3 has one change: both barrel and endcap
use the exponential scaling for the neutral hadron isolation cut
(in V3 it was only done for the barrel)

Definition at line 579 of file cutBasedPhotonID_tools.py.

References psetChHadIsoWithEALinScalingCut(), psetMinPtCut(), psetNeuHadIsoWithEAExpoScalingCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoHcalOverEcalBcCut(), psetPhoIsoWithEALinScalingCut(), and psetPhoSCEtaMultiRangeCut().

579 def configureVIDCutBasedPhoID_V4( wpEB, wpEE, isoInputs ):
580  """
581  This function configures the full cms.PSet for a VID ID and returns it.
582  The inputs: first object is of the type WorkingPoint_V2, second object
583  is of the type WorkingPoint_V2 as well, first containing the cuts for the
584  Barrel (EB) and the other one for the Endcap (EE).
585  The third argument contains data for isolation calculation.
586 
587  The V4 with respect to V3 has one change: both barrel and endcap
588  use the exponential scaling for the neutral hadron isolation cut
589  (in V3 it was only done for the barrel)
590  """
591  # print "VID: Configuring cut set %s" % wpEB.idName
592  parameterSet = cms.PSet(
593  #
594  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
595  cutFlow = cms.VPSet(
596  psetMinPtCut(), # pt cut
597  psetPhoSCEtaMultiRangeCut(), # eta cut
598  psetPhoHcalOverEcalBcCut(wpEB,wpEE), # H/E cut
599  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
600  psetChHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
601  psetNeuHadIsoWithEAExpoScalingCut(wpEB,wpEE,isoInputs), # neutral hadron isolation cut
602  psetPhoIsoWithEALinScalingCut(wpEB,wpEE,isoInputs) # photon isolation cut
603  )
604  )
605  #
606  return parameterSet
607 
def psetNeuHadIsoWithEAExpoScalingCut(wpEB, wpEE, isoInputs)
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def configureVIDCutBasedPhoID_V4(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)

◆ configureVIDCutBasedPhoID_V5()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V5 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: first object is of the type WorkingPoint_V2, second object
is of the type WorkingPoint_V2 as well, first containing the cuts for the 
Barrel (EB) and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

The V5 with respect to V4 has one change: the neutral hadron isolation
for both barrel and endcap now uses quadratic polynomial scaling.

Definition at line 608 of file cutBasedPhotonID_tools.py.

References psetChHadIsoWithEALinScalingCut(), psetMinPtCut(), psetNeuHadIsoWithEAQuadScalingCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoHcalOverEcalBcCut(), psetPhoIsoWithEALinScalingCut(), and psetPhoSCEtaMultiRangeCut().

608 def configureVIDCutBasedPhoID_V5( wpEB, wpEE, isoInputs ):
609  """
610  This function configures the full cms.PSet for a VID ID and returns it.
611  The inputs: first object is of the type WorkingPoint_V2, second object
612  is of the type WorkingPoint_V2 as well, first containing the cuts for the
613  Barrel (EB) and the other one for the Endcap (EE).
614  The third argument contains data for isolation calculation.
615 
616  The V5 with respect to V4 has one change: the neutral hadron isolation
617  for both barrel and endcap now uses quadratic polynomial scaling.
618  """
619  # print "VID: Configuring cut set %s" % wpEB.idName
620  parameterSet = cms.PSet(
621  #
622  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
623  cutFlow = cms.VPSet(
624  psetMinPtCut(), # pt cut
625  psetPhoSCEtaMultiRangeCut(), # eta cut
626  psetPhoHcalOverEcalBcCut(wpEB,wpEE), # H/E cut
627  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
628  psetChHadIsoWithEALinScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
629  psetNeuHadIsoWithEAQuadScalingCut(wpEB,wpEE,isoInputs), # neutral hadron isolation cut
630  psetPhoIsoWithEALinScalingCut(wpEB,wpEE,isoInputs) # photon isolation cut
631  )
632  )
633  #
634  return parameterSet
635 
636 
637 
def psetNeuHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs)
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)
def configureVIDCutBasedPhoID_V5(wpEB, wpEE, isoInputs)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)

◆ configureVIDCutBasedPhoID_V6()

def cutBasedPhotonID_tools.configureVIDCutBasedPhoID_V6 (   wpEB,
  wpEE,
  isoInputs,
  clusterIsoInputs,
  hOverEInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: first object is of the type WorkingPoint_V3, second object
is of the type WorkingPoint_V3 as well, first containing the cuts for the
Barrel (EB) and the other one for the Endcap (EE).
The third argument contains data for isolation calculation.

The V6 with respect to V5 has following changes:
    1) H/E is now cone-based instead of tower-based.
    2) Neutral hadron isolation is replaced by HCal Cluster isolation
    for both barrel and endcap (and uses quadratic polynomial scaling
    as done before for neutral hadron isolation).
    3) Photon isolation is replaced by ECal Cluster isolation for both
    barrel and endcap (and uses linear polynomial scaling as done before
    for photon isolation).

Definition at line 638 of file cutBasedPhotonID_tools.py.

References psetChgHadIsoWithEAQuadScalingCut(), psetECalClusIsoWithEAQuadScalingCut(), psetHCalClusIsoWithEAQuadScalingCut(), psetMinPtCut(), psetPhoFull5x5SigmaIEtaIEtaCut(), psetPhoHcalOverEcalWithEACut(), and psetPhoSCEtaMultiRangeCut().

638 def configureVIDCutBasedPhoID_V6( wpEB, wpEE, isoInputs, clusterIsoInputs, hOverEInputs ):
639  """
640  This function configures the full cms.PSet for a VID ID and returns it.
641  The inputs: first object is of the type WorkingPoint_V3, second object
642  is of the type WorkingPoint_V3 as well, first containing the cuts for the
643  Barrel (EB) and the other one for the Endcap (EE).
644  The third argument contains data for isolation calculation.
645 
646  The V6 with respect to V5 has following changes:
647  1) H/E is now cone-based instead of tower-based.
648  2) Neutral hadron isolation is replaced by HCal Cluster isolation
649  for both barrel and endcap (and uses quadratic polynomial scaling
650  as done before for neutral hadron isolation).
651  3) Photon isolation is replaced by ECal Cluster isolation for both
652  barrel and endcap (and uses linear polynomial scaling as done before
653  for photon isolation).
654  """
655 
656  # print "VID: Configuring cut set %s" % wpEB.idName
657  parameterSet = cms.PSet(
658  #
659  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
660  cutFlow = cms.VPSet(
661  psetMinPtCut(), # pt cut
662  psetPhoSCEtaMultiRangeCut(), # eta cut
663  psetPhoFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), # full 5x5 sigmaIEtaIEta cut
664  psetPhoHcalOverEcalWithEACut(wpEB,wpEE,hOverEInputs), # H/E cut
665  psetChgHadIsoWithEAQuadScalingCut(wpEB,wpEE,isoInputs), # charged hadron isolation cut
666  psetECalClusIsoWithEAQuadScalingCut(wpEB,wpEE,clusterIsoInputs), # ecal cluster isolation cut
667  psetHCalClusIsoWithEAQuadScalingCut(wpEB,wpEE,clusterIsoInputs) # hcal cluster isolation cut
668  )
669  )
670  #
671  return parameterSet
672 
673 
674 
def psetChgHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs)
def configureVIDCutBasedPhoID_V6(wpEB, wpEE, isoInputs, clusterIsoInputs, hOverEInputs)
def psetECalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs)
def psetHCalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs)
def psetPhoHcalOverEcalWithEACut(wpEB, wpEE, hOverEInputs)
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)

◆ psetChgHadIsoWithEAQuadScalingCut()

def cutBasedPhotonID_tools.psetChgHadIsoWithEAQuadScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_V3
The third argument contains data for isolation calculation.
The cut is (for lessThan==True), otherwise replace "<" with ">="
      X < constTerm + linearPtTerm*pt + quadPtTerm* pt*pt + rho*EA

Definition at line 413 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V6().

413 def psetChgHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs):
414  """
415  Arguments: two containers of working point cut values of the type WorkingPoint_V3
416  The third argument contains data for isolation calculation.
417  The cut is (for lessThan==True), otherwise replace "<" with ">="
418  X < constTerm + linearPtTerm*pt + quadPtTerm* pt*pt + rho*EA
419  """
420  return cms.PSet(
421  cutName = cms.string('PhoGenericQuadraticRhoPtScaledCut'),
422  cutVariable = cms.string("chargedHadronIso"),
423  lessThan = cms.bool(True),
424  # cut
425  constTermEB = cms.double( wpEB.absPFChgHadIsoWithEACut_C1 ),
426  constTermEE = cms.double( wpEE.absPFChgHadIsoWithEACut_C1 ),
427  linearPtTermEB = cms.double( wpEB.absPFChgHadIsoWithEACut_C2 ),
428  linearPtTermEE = cms.double( wpEE.absPFChgHadIsoWithEACut_C2 ),
429  quadraticPtTermEB = cms.double( 0. ),
430  quadraticPtTermEE = cms.double( 0. ),
431  needsAdditionalProducts = cms.bool(True),
432  isIgnored = cms.bool(False),
433  rho = cms.InputTag("fixedGridRhoFastjetAll"),
434  quadEAflag = cms.bool(True),
435  effAreasConfigFile = cms.FileInPath( isoInputs.chHadIsolationEffAreas )
436  )
437 
438 
439 
440 # Configure the cut on the ECal cluster isolation that uses
441 # the quadratic pt scaling for barrel and endcap
def psetChgHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs)

◆ psetChHadIsoWithEALinScalingCut()

def cutBasedPhotonID_tools.psetChHadIsoWithEALinScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.
The cut is (for lessThan==True), otherwise replace "<" with ">="
      X < constTerm + linearPtTerm*pt + quadPtTerm* pt*pt + rho*EA

Definition at line 238 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), configureVIDCutBasedPhoID_V2(), configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), and configureVIDCutBasedPhoID_V5().

238 def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs):
239  """
240  Arguments: two containers of working point cut values of the type WorkingPoint_*
241  The third argument contains data for isolation calculation.
242  The cut is (for lessThan==True), otherwise replace "<" with ">="
243  X < constTerm + linearPtTerm*pt + quadPtTerm* pt*pt + rho*EA
244  """
245  return cms.PSet(
246  cutName = cms.string('PhoGenericRhoPtScaledCut'),
247  cutVariable = cms.string("chargedHadronIso"),
248  lessThan = cms.bool(True),
249  # cut
250  constTermEB = cms.double( wpEB.absPFChaHadIsoWithEACut_C1 ),
251  constTermEE = cms.double( wpEE.absPFChaHadIsoWithEACut_C1 ),
252  linearPtTermEB = cms.double( wpEB.absPFChaHadIsoWithEACut_C2 ),
253  linearPtTermEE = cms.double( wpEE.absPFChaHadIsoWithEACut_C2 ),
254  quadPtTermEB = cms.double( 0. ),
255  quadPtTermEE = cms.double( 0. ),
256  needsAdditionalProducts = cms.bool(True),
257  isIgnored = cms.bool(False),
258  rho = cms.InputTag("fixedGridRhoFastjetAll"),
259  effAreasConfigFile = cms.FileInPath( isoInputs.chHadIsolationEffAreas )
260  )
261 
262 # Configure the cut on the neutral hadron isolation that uses
263 # the linear pt scaling for barrel and endcap
def psetChHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)

◆ psetECalClusIsoWithEAQuadScalingCut()

def cutBasedPhotonID_tools.psetECalClusIsoWithEAQuadScalingCut (   wpEB,
  wpEE,
  clusterIsoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_V3
The third argument contains data for isolation calculation.

Definition at line 442 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V6().

442 def psetECalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs):
443  """
444  Arguments: two containers of working point cut values of the type WorkingPoint_V3
445  The third argument contains data for isolation calculation.
446  """
447  return cms.PSet(
448  cutName = cms.string('PhoGenericQuadraticRhoPtScaledCut'),
449  cutVariable = cms.string("ecalPFClusterIso"),
450  lessThan = cms.bool(True),
451  # cut
452  constTermEB = cms.double( wpEB.absPFECalClusIsoWithEACut_C1 ),
453  constTermEE = cms.double( wpEE.absPFECalClusIsoWithEACut_C1 ),
454  linearPtTermEB = cms.double( wpEB.absPFECalClusIsoWithEACut_C2 ),
455  linearPtTermEE = cms.double( wpEE.absPFECalClusIsoWithEACut_C2 ),
456  quadraticPtTermEB = cms.double( 0. ),
457  quadraticPtTermEE = cms.double( 0. ),
458  needsAdditionalProducts = cms.bool(True),
459  isIgnored = cms.bool(False),
460  rho = cms.InputTag("fixedGridRhoFastjetAll"),
461  quadEAflag = cms.bool(True),
462  effAreasConfigFile = cms.FileInPath( clusterIsoInputs.ecalClusIsolationEffAreas )
463  )
464 
465 
466 # Configure the cut on the HCal cluster isolation that uses
467 # the quadratic polynomial pt scaling for both barrel and endcap
def psetECalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs)

◆ psetHCalClusIsoWithEAQuadScalingCut()

def cutBasedPhotonID_tools.psetHCalClusIsoWithEAQuadScalingCut (   wpEB,
  wpEE,
  clusterIsoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_V3
The third argument contains data for isolation calculation.

Definition at line 468 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V6().

468 def psetHCalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs):
469  """
470  Arguments: two containers of working point cut values of the type WorkingPoint_V3
471  The third argument contains data for isolation calculation.
472  """
473  return cms.PSet(
474  cutName = cms.string('PhoGenericQuadraticRhoPtScaledCut'),
475  cutVariable = cms.string("hcalPFClusterIso"),
476  lessThan = cms.bool(True),
477  # cut
478  constTermEB = cms.double( wpEB.absPFHCalClusIsoWithEACut_C1 ),
479  constTermEE = cms.double( wpEE.absPFHCalClusIsoWithEACut_C1 ),
480  linearPtTermEB = cms.double( wpEB.absPFHCalClusIsoWithEACut_C2 ),
481  linearPtTermEE = cms.double( wpEE.absPFHCalClusIsoWithEACut_C2 ),
482  quadraticPtTermEB = cms.double( wpEB.absPFHCalClusIsoWithEACut_C3 ),
483  quadraticPtTermEE = cms.double( wpEE.absPFHCalClusIsoWithEACut_C3 ),
484  needsAdditionalProducts = cms.bool(True),
485  isIgnored = cms.bool(False),
486  rho = cms.InputTag("fixedGridRhoFastjetAll"),
487  quadEAflag = cms.bool(True),
488  effAreasConfigFile = cms.FileInPath( clusterIsoInputs.hcalClusIsolationEffAreas )
489  )
490 
491 
492 
493 # ==============================================================
494 # Define the complete cut sets
495 # ==============================================================
496 
497 
def psetHCalClusIsoWithEAQuadScalingCut(wpEB, wpEE, clusterIsoInputs)

◆ psetMinPtCut()

def cutBasedPhotonID_tools.psetMinPtCut ( )

Definition at line 167 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), configureVIDCutBasedPhoID_V2(), configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), configureVIDCutBasedPhoID_V5(), and configureVIDCutBasedPhoID_V6().

167 def psetMinPtCut():
168  return cms.PSet(
169  cutName = cms.string("MinPtCut"),
170  minPt = cms.double(5.0),
171  needsAdditionalProducts = cms.bool(False),
172  isIgnored = cms.bool(False)
173  )
174 
175 # Take all particles in the eta ranges 0-ebCutOff and ebCutOff-2.5

◆ psetNeuHadIsoWithEAExpoScalingCut()

def cutBasedPhotonID_tools.psetNeuHadIsoWithEAExpoScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.

Definition at line 313 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V4().

313 def psetNeuHadIsoWithEAExpoScalingCut(wpEB, wpEE, isoInputs):
314  """
315  Arguments: two containers of working point cut values of the type WorkingPoint_*
316  The third argument contains data for isolation calculation.
317  """
318  return cms.PSet(
319  cutName = cms.string('PhoAnyPFIsoWithEAAndExpoScalingCut'), # Neutral hadrons isolation block
320  # Barrel: cut = c1 + expo(pt*c2+c3)
321  C1_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C1 ),
322  C2_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C2 ),
323  C3_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C3 ),
324  # Endcap: cut = cut = c1 + expo(pt*c2+c3)
325  C1_EE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C1 ),
326  C2_EE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C2 ),
327  C3_EE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C3 ),
328  anyPFIsoMap = cms.InputTag( isoInputs.neuHadIsolationMapName ),
329  barrelCutOff = cms.double(ebCutOff),
330  useRelativeIso = cms.bool(False),
331  needsAdditionalProducts = cms.bool(True),
332  isIgnored = cms.bool(False),
333  rho = cms.InputTag("fixedGridRhoFastjetAll"),
334  effAreasConfigFile = cms.FileInPath( isoInputs.neuHadIsolationEffAreas )
335  )
336 
337 # Configure the cut on the neutral hadron isolation that uses
338 # the quadratic polynomial pt scaling for both barrel and endcap
def psetNeuHadIsoWithEAExpoScalingCut(wpEB, wpEE, isoInputs)

◆ psetNeuHadIsoWithEAExpoScalingEBCut()

def cutBasedPhotonID_tools.psetNeuHadIsoWithEAExpoScalingEBCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.

Definition at line 288 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V2(), and configureVIDCutBasedPhoID_V3().

288 def psetNeuHadIsoWithEAExpoScalingEBCut(wpEB, wpEE, isoInputs):
289  """
290  Arguments: two containers of working point cut values of the type WorkingPoint_*
291  The third argument contains data for isolation calculation.
292  """
293  return cms.PSet(
294  cutName = cms.string('PhoAnyPFIsoWithEAAndExpoScalingEBCut'), # Neutral hadrons isolation block
295  # Barrel: cut = c1 + expo(pt*c2+c3)
296  C1_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C1 ),
297  C2_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C2 ),
298  C3_EB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C3 ),
299  # Endcap: cut = c1 + pt*c2
300  C1_EE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C1 ),
301  C2_EE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C2 ),
302  anyPFIsoMap = cms.InputTag( isoInputs.neuHadIsolationMapName ),
303  barrelCutOff = cms.double(ebCutOff),
304  useRelativeIso = cms.bool(False),
305  needsAdditionalProducts = cms.bool(True),
306  isIgnored = cms.bool(False),
307  rho = cms.InputTag("fixedGridRhoFastjetAll"),
308  effAreasConfigFile = cms.FileInPath( isoInputs.neuHadIsolationEffAreas )
309  )
310 
311 # Configure the cut on the neutral hadron isolation that uses
312 # the exponential pt scaling for both barrel and endcap
def psetNeuHadIsoWithEAExpoScalingEBCut(wpEB, wpEE, isoInputs)

◆ psetNeuHadIsoWithEALinScalingCut()

def cutBasedPhotonID_tools.psetNeuHadIsoWithEALinScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.

Definition at line 264 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1().

264 def psetNeuHadIsoWithEALinScalingCut( wpEB, wpEE, isoInputs):
265  """
266  Arguments: two containers of working point cut values of the type WorkingPoint_*
267  The third argument contains data for isolation calculation.
268  """
269  return cms.PSet(
270  cutName = cms.string('PhoGenericRhoPtScaledCut'),
271  cutVariable = cms.string("neutralHadronIso"),
272  lessThan = cms.bool(True),
273  # cut
274  constTermEB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C1 ),
275  constTermEE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C1 ),
276  linearPtTermEB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C2 ),
277  linearPtTermEE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C2 ),
278  quadPtTermEB = cms.double( 0. ),
279  quadPtTermEE = cms.double( 0. ),
280  needsAdditionalProducts = cms.bool(True),
281  isIgnored = cms.bool(False),
282  rho = cms.InputTag("fixedGridRhoFastjetAll"),
283  effAreasConfigFile = cms.FileInPath( isoInputs.neuHadIsolationEffAreas )
284  )
285 
286 # Configure the cut on the neutral hadron isolation that uses
287 # the exponential pt scaling for barrel and the linear pt scaling for endcap
def psetNeuHadIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)

◆ psetNeuHadIsoWithEAQuadScalingCut()

def cutBasedPhotonID_tools.psetNeuHadIsoWithEAQuadScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.

Definition at line 339 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V5().

339 def psetNeuHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs):
340  """
341  Arguments: two containers of working point cut values of the type WorkingPoint_*
342  The third argument contains data for isolation calculation.
343  """
344  return cms.PSet(
345  cutName = cms.string('PhoGenericRhoPtScaledCut'),
346  cutVariable = cms.string("neutralHadronIso"),
347  lessThan = cms.bool(True),
348  # cut
349  constTermEB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C1 ),
350  constTermEE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C1 ),
351  linearPtTermEB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C2 ),
352  linearPtTermEE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C2 ),
353  quadPtTermEB = cms.double( wpEB.absPFNeuHadIsoWithEACut_C3 ),
354  quadPtTermEE = cms.double( wpEE.absPFNeuHadIsoWithEACut_C3 ),
355  needsAdditionalProducts = cms.bool(True),
356  isIgnored = cms.bool(False),
357  rho = cms.InputTag("fixedGridRhoFastjetAll"),
358  effAreasConfigFile = cms.FileInPath( isoInputs.neuHadIsolationEffAreas )
359  )
360 
361 # Configure the cut on the photon isolation that uses
362 # the linear pt scaling for barrel and endcap
def psetNeuHadIsoWithEAQuadScalingCut(wpEB, wpEE, isoInputs)

◆ psetPhoFull5x5SigmaIEtaIEtaCut()

def cutBasedPhotonID_tools.psetPhoFull5x5SigmaIEtaIEtaCut (   wpEB,
  wpEE 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*

Definition at line 223 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), configureVIDCutBasedPhoID_V5(), and configureVIDCutBasedPhoID_V6().

223 def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE):
224  """
225  Arguments: two containers of working point cut values of the type WorkingPoint_*
226  """
227  return cms.PSet(
228  cutName = cms.string('PhoFull5x5SigmaIEtaIEtaCut'),
229  cutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
230  cutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
231  barrelCutOff = cms.double(ebCutOff),
232  needsAdditionalProducts = cms.bool(False),
233  isIgnored = cms.bool(False)
234  )
235 
236 # Configure the cut on the charged hadron isolation that uses
237 # the linear pt scaling for barrel and endcap
def psetPhoFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)

◆ psetPhoFull5x5SigmaIEtaIEtaValueMapCut()

def cutBasedPhotonID_tools.psetPhoFull5x5SigmaIEtaIEtaValueMapCut (   wpEB,
  wpEE 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*

Definition at line 207 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), and configureVIDCutBasedPhoID_V2().

208  """
209  Arguments: two containers of working point cut values of the type WorkingPoint_*
210  """
211  return cms.PSet(
212  cutName = cms.string('PhoFull5x5SigmaIEtaIEtaValueMapCut'),
213  cutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
214  cutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
215  full5x5SigmaIEtaIEtaMap = cms.InputTag('photonIDValueMapProducer:phoFull5x5SigmaIEtaIEta'),
216  barrelCutOff = cms.double(ebCutOff),
217  needsAdditionalProducts = cms.bool(True),
218  isIgnored = cms.bool(False)
219  )
220 
221 # Configure the cut on full5x5 sigmaIEtaIEta that uses the native Photon field
222 # with this variable (works for releases past 7.2.0).
def psetPhoFull5x5SigmaIEtaIEtaValueMapCut(wpEB, wpEE)

◆ psetPhoHcalOverEcalBcCut()

def cutBasedPhotonID_tools.psetPhoHcalOverEcalBcCut (   wpEB,
  wpEE 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*

Definition at line 191 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), configureVIDCutBasedPhoID_V2(), configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), and configureVIDCutBasedPhoID_V5().

191 def psetPhoHcalOverEcalBcCut( wpEB, wpEE):
192  """
193  Arguments: two containers of working point cut values of the type WorkingPoint_*
194  """
195  return cms.PSet(
196  cutName = cms.string('PhotonHcalOverEcalBcCut'),
197  hcalOverEcalCutValueEB = cms.double( wpEB.hOverECut ),
198  hcalOverEcalCutValueEE = cms.double( wpEE.hOverECut ),
199  barrelCutOff = cms.double(ebCutOff),
200  needsAdditionalProducts = cms.bool(False),
201  isIgnored = cms.bool(False)
202  )
203 
204 # Configure the cut on full5x5 sigmaIEtaIEta that uses a ValueMap,
205 # relying on an upstream producer that creates it. This was necessary
206 # for photons up to 7.2.0.
def psetPhoHcalOverEcalBcCut(wpEB, wpEE)

◆ psetPhoHcalOverEcalWithEACut()

def cutBasedPhotonID_tools.psetPhoHcalOverEcalWithEACut (   wpEB,
  wpEE,
  hOverEInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_V3
Third argument contains the effective areas for pile-up corrections.

Definition at line 387 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V6().

387 def psetPhoHcalOverEcalWithEACut( wpEB, wpEE, hOverEInputs ):
388  """
389  Arguments: two containers of working point cut values of the type WorkingPoint_V3
390  Third argument contains the effective areas for pile-up corrections.
391  """
392  return cms.PSet(
393  cutName = cms.string('PhoGenericQuadraticRhoPtScaledCut'),
394  cutVariable = cms.string("hcalOverEcal"),
395  lessThan = cms.bool(True),
396  # cut
397  constTermEB = cms.double( wpEB.hOverEwithEACut ),
398  constTermEE = cms.double( wpEE.hOverEwithEACut ),
399  linearPtTermEB = cms.double( 0. ),
400  linearPtTermEE = cms.double( 0. ),
401  quadraticPtTermEB = cms.double( 0. ),
402  quadraticPtTermEE = cms.double( 0. ),
403  needsAdditionalProducts = cms.bool(True),
404  isIgnored = cms.bool(False),
405  rho = cms.InputTag("fixedGridRhoFastjetAll"),
406  quadEAflag = cms.bool(True),
407  effAreasConfigFile = cms.FileInPath( hOverEInputs.hOverEEffAreas )
408  )
409 
410 
411 # Configure the cut on the charged hadron isolation that uses
412 # the quadratic pt scaling for barrel and endcap
def psetPhoHcalOverEcalWithEACut(wpEB, wpEE, hOverEInputs)

◆ psetPhoIsoWithEALinScalingCut()

def cutBasedPhotonID_tools.psetPhoIsoWithEALinScalingCut (   wpEB,
  wpEE,
  isoInputs 
)
Arguments: two containers of working point cut values of the type WorkingPoint_*
The third argument contains data for isolation calculation.

Definition at line 363 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), configureVIDCutBasedPhoID_V2(), configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), and configureVIDCutBasedPhoID_V5().

363 def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs):
364  """
365  Arguments: two containers of working point cut values of the type WorkingPoint_*
366  The third argument contains data for isolation calculation.
367  """
368  return cms.PSet(
369  cutName = cms.string('PhoGenericRhoPtScaledCut'),
370  cutVariable = cms.string("photonIso"),
371  lessThan = cms.bool(True),
372  # cut
373  constTermEB = cms.double( wpEB.absPFPhoIsoWithEACut_C1 ),
374  constTermEE = cms.double( wpEE.absPFPhoIsoWithEACut_C1 ),
375  linearPtTermEB = cms.double( wpEB.absPFPhoIsoWithEACut_C2 ),
376  linearPtTermEE = cms.double( wpEE.absPFPhoIsoWithEACut_C2 ),
377  quadPtTermEB = cms.double( 0. ),
378  quadPtTermEE = cms.double( 0. ),
379  needsAdditionalProducts = cms.bool(True),
380  isIgnored = cms.bool(False),
381  rho = cms.InputTag("fixedGridRhoFastjetAll"),
382  effAreasConfigFile = cms.FileInPath( isoInputs.phoIsolationEffAreas )
383  )
384 
385 
386 # Configure the cut on H/E (cone-based)
def psetPhoIsoWithEALinScalingCut(wpEB, wpEE, isoInputs)

◆ psetPhoSCEtaMultiRangeCut()

def cutBasedPhotonID_tools.psetPhoSCEtaMultiRangeCut ( )

Definition at line 176 of file cutBasedPhotonID_tools.py.

Referenced by configureVIDCutBasedPhoID_V1(), configureVIDCutBasedPhoID_V2(), configureVIDCutBasedPhoID_V3(), configureVIDCutBasedPhoID_V4(), configureVIDCutBasedPhoID_V5(), and configureVIDCutBasedPhoID_V6().

177  return cms.PSet(
178  cutName = cms.string("PhoSCEtaMultiRangeCut"),
179  useAbsEta = cms.bool(True),
180  allowedEtaRanges = cms.VPSet(
181  cms.PSet( minEta = cms.double(0.0),
182  maxEta = cms.double(ebCutOff) ),
183  cms.PSet( minEta = cms.double(ebCutOff),
184  maxEta = cms.double(2.5) )
185  ),
186  needsAdditionalProducts = cms.bool(False),
187  isIgnored = cms.bool(False)
188  )
189 
190 # Configure the cut on H/E

Variable Documentation

◆ ebCutOff

cutBasedPhotonID_tools.ebCutOff

Definition at line 5 of file cutBasedPhotonID_tools.py.