CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Electron.Electron Class Reference
Inheritance diagram for Electron.Electron:

Public Member Functions

def __init__ (self, args, kwargs)
 
def absIsoWithFSR (self, R=0.4, puCorr="rhoArea", dBetaFactor=0.5)
 
def chargedAllIso (self)
 
def chargedAllIsoR (self, R=0.4)
 
def chargedHadronIsoR (self, R=0.4)
 
def cutBasedId (self, wp, showerShapes="auto")
 
def dxy (self, vertex=None)
 
def dz (self, vertex=None)
 
def edxy (self)
 
def edz (self)
 
def electronID (self, id, vertex=None, rho=None)
 
def lostInner (self)
 
def mvaId (self)
 
def mvaIDLoose (self, full5x5=False)
 
def mvaIDRun2 (self, name, wp)
 
def mvaIDTight (self, full5x5=False)
 
def mvaNonTrigV0 (self, full5x5=False, debug=False)
 
def mvaRun2 (self, name, debug=False)
 
def mvaTrigNoIPV0 (self, full5x5=False, debug=False)
 
def mvaTrigV0 (self, full5x5=False, debug=False)
 
def neutralHadronIsoR (self, R=0.4)
 
def p4 (self)
 
def photonIsoR (self, R=0.4)
 
def ptErr (self)
 
def puChargedHadronIsoR (self, R=0.4)
 
def tightId (self)
 
def validCandidateP4Kind (self)
 

Public Attributes

 associatedVertex
 
 rho
 
 tightIdResult
 

Private Member Functions

def _physObjInit (self)
 

Private Attributes

 _mvaNonTrigV0
 
 _mvaRun2
 
 _mvaTrigNoIPV0
 
 _mvaTrigV0
 

Detailed Description

Definition at line 6 of file Electron.py.

Constructor & Destructor Documentation

◆ __init__()

def Electron.Electron.__init__ (   self,
  args,
  kwargs 
)
Initializing tightIdResult to None. The user is responsible
for setting this attribute externally if he wants to use the tightId
function.

Definition at line 8 of file Electron.py.

References Electron.Electron._physObjInit().

8  def __init__(self, *args, **kwargs):
9  '''Initializing tightIdResult to None. The user is responsible
10  for setting this attribute externally if he wants to use the tightId
11  function.'''
12  super(Electron, self).__init__(*args, **kwargs)
13  self._physObjInit()
14 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ _physObjInit()

def Electron.Electron._physObjInit (   self)
private

Definition at line 15 of file Electron.py.

Referenced by Electron.Electron.__init__(), Photon.Photon.__init__(), and Jet.Jet.__init__().

15  def _physObjInit(self):
16  self.tightIdResult = None
17  self.associatedVertex = None
18  self.rho = None
19  self._mvaNonTrigV0 = {True:None, False:None}
20  self._mvaTrigV0 = {True:None, False:None}
21  self._mvaTrigNoIPV0 = {True:None, False:None}
22  self._mvaRun2 = {}
23 

◆ absIsoWithFSR()

def Electron.Electron.absIsoWithFSR (   self,
  R = 0.4,
  puCorr = "rhoArea",
  dBetaFactor = 0.5 
)
Calculate Isolation, subtract FSR, apply specific PU corrections" 

Definition at line 347 of file Electron.py.

References Electron.Electron.chargedHadronIsoR(), eleIsoSequence_cff.deltaR, PVValHelper.eta, EcalRegressionData.isEB(), CaloGenericDetId.isEB(), SimplePhoton.isEB(), SimpleElectron.isEB(), reco::Photon::FiducialFlags.isEB, DRNCorrectionProducerT< T >.isEB(), reco::Photon.isEB(), reco::GsfElectron::FiducialFlags.isEB, reco::GsfElectron.isEB(), WZElectronSkims53X_cff.max, Electron.Electron.neutralHadronIsoR(), Electron.Electron.photonIsoR(), PhysicsObject.PhysicsObject.physObj, Electron.Electron.puChargedHadronIsoR(), python.rootplot.root2matplotlib.replace(), Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, objects.JetAnalyzer.JetAnalyzer.rho, and str.

347  def absIsoWithFSR(self, R=0.4, puCorr="rhoArea", dBetaFactor=0.5):
348  '''
349  Calculate Isolation, subtract FSR, apply specific PU corrections"
350  '''
351  photonIso = self.photonIsoR(R)
352  if hasattr(self,'fsrPhotons'):
353  for gamma in self.fsrPhotons:
354  dr = deltaR(gamma.eta(), gamma.phi(), self.physObj.eta(), self.physObj.phi())
355  if (self.isEB() or dr > 0.08) and dr < R:
356  photonIso = max(photonIso-gamma.pt(),0.0)
357  if puCorr == "deltaBeta":
358  offset = dBetaFactor * self.puChargedHadronIsoR(R)
359  elif puCorr == "rhoArea":
360  offset = self.rho*getattr(self,"EffectiveArea"+(str(R).replace(".","")))
361  elif puCorr in ["none","None",None]:
362  offset = 0
363  else:
364  raise RuntimeError("Unsupported PU correction scheme %s" % puCorr)
365  return self.chargedHadronIsoR(R)+max(0.,photonIso+self.neutralHadronIsoR(R)-offset)
366 
367 
def replace(string, replacements)
#define str(s)

◆ chargedAllIso()

def Electron.Electron.chargedAllIso (   self)

Definition at line 338 of file Electron.py.

338  def chargedAllIso(self):
339  raise RuntimeError("Electron chargedAllIso missing")
340 

◆ chargedAllIsoR()

def Electron.Electron.chargedAllIsoR (   self,
  R = 0.4 
)

Definition at line 334 of file Electron.py.

References PhysicsObject.PhysicsObject.physObj.

Referenced by Lepton.Lepton.absIsoR(), and Muon.Muon.chargedAllIso().

334  def chargedAllIsoR(self,R=0.4):
335  if R == 0.3: return self.physObj.pfIsolationVariables().sumChargedParticlePt
336  raise RuntimeError("Electron chargedAllIso missing for R=%s" % R)
337 

◆ chargedHadronIsoR()

def Electron.Electron.chargedHadronIsoR (   self,
  R = 0.4 
)

Definition at line 319 of file Electron.py.

References photons_cff.chargedHadronIso, and PhysicsObject.PhysicsObject.physObj.

Referenced by Lepton.Lepton.absIsoR(), Muon.Muon.absIsoWithFSR(), and Electron.Electron.absIsoWithFSR().

319  def chargedHadronIsoR(self,R=0.4):
320  if R == 0.3: return self.physObj.pfIsolationVariables().sumChargedHadronPt
321  elif R == 0.4: return self.physObj.chargedHadronIso()
322  raise RuntimeError("Electron chargedHadronIso missing for R=%s" % R)
323 

◆ cutBasedId()

def Electron.Electron.cutBasedId (   self,
  wp,
  showerShapes = "auto" 
)

Definition at line 48 of file Electron.py.

References funct.abs(), btagbtvdeep::TrackPairFeatures.dxy, btagbtvdeep::SeedingTrackFeatures.dxy, btagbtvdeep::SecondaryVertexFeatures.dxy, hi::TrackStructure.dxy, btagbtvdeep::ChargedCandidateFeatures.dxy, l1ScoutingRun3::ugmt::shiftsMuon.dxy, trklet::L1SimTrack.dxy(), l1ScoutingRun3::ugmt::masksMuon.dxy, L1MuKBMTrack.dxy(), reco::PFTauTransverseImpactParameter.dxy(), l1t::PFCandidate.dxy(), l1t::PFTau.dxy(), Run3ScoutingParticle.dxy(), TopMonitor::PVcut.dxy, BTagAndProbe::PVcut.dxy, l1t::KMTFTrack.dxy(), pat::IsolatedTrack.dxy(), ScoutingMuon.dxy(), emtf::phase2::track_t.dxy, reco::Conversion.dxy(), reco::TrackBase.dxy(), l1t::EMTFTrack.dxy, pat::Tau.dxy(), pat::PackedGenParticle.dxy(), Electron.Electron.dxy(), pat::PackedCandidate.dxy(), btagbtvdeep::TrackPairFeatures.dz, btagbtvdeep::SeedingTrackFeatures.dz, hi::TrackStructure.dz, egammaisolation::EgammaTrackSelector.dz, RigidBodyAlignmentParameters.dz, DetGeometry::DirectionData.dz, BowedSurfaceAlignmentDerivatives.dz, btagbtvdeep::ChargedCandidateFeatures.dz, BowedSurfaceAlignmentParameters.dz, HGCalTBParameters::hgtrap.dz, mkfit::ModuleShape.dz, DTMuonSLToSL.dz, PreshowerStrip.dz(), IdealZDCTrapezoid.dz(), DDHCalXtalAlgo.dz, DDHCalTestBeamAlgo.dz, IdealObliquePrism.dz(), IdealZPrism.dz(), IdealCastorTrapezoid.dz(), FlatHexagon.dz(), pat::VertexAssociation.dz(), DTMuonMillepede.dz, HGCalParameters::hgtrap.dz, ScoutingElectron.dz(), Run3ScoutingParticle.dz(), FlatTrd.dz(), TopMonitor::PVcut.dz, BTagAndProbe::PVcut.dz, EcalTrapezoidParameters.dz(), gpuPixelDoublets::CellCutsT< TrackerTraits >.dz, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::CellCutsT< TrackerTraits >.dz, TrackerValidationVariables::AVTrackStruct.dz, pat::IsolatedTrack.dz(), ScoutingMuon.dz(), TrackStruct::TrackParameterStruct.dz, reco::Conversion.dz(), MuonGeometryArrange::MGACollection.dz, trklet::IMATH_TrackletCalculatorDisk.dz, trklet::IMATH_TrackletCalculatorOverlap.dz, trklet::IMATH_TrackletCalculator.dz, CosmicRateAnalyzer.dz, reco::TrackBase.dz(), pat::PackedGenParticle.dz(), Electron.Electron.dz(), pat::PackedCandidate.dz(), electrons_cff.ecalEnergy, HLT_2024v14_cff.full5x5_sigmaIetaIeta, electrons_cff.isEB, TrackCollections2monitor_cff.numberOfLostHits, PhysicsObject.PhysicsObject.physObj, and run3scouting_cff.sigmaIetaIeta.

Referenced by Electron.Electron.electronID().

48  def cutBasedId(self, wp, showerShapes="auto"):
49  if "_full5x5" in wp:
50  showerShapes = "full5x5"
51  wp = wp.replace("_full5x5","")
52  elif showerShapes == "auto":
53  if "POG_CSA14_25ns_v1" in wp or "POG_CSA14_50ns_v1" in wp or "POG_PHYS14_25ns_v1" in wp or "POG_PHYS14_25ns_v1_ConvVeto" in wp or "POG_PHYS14_25ns_v1_ConvVetoDxyDz" in wp or "POG_PHYS14_25ns_v2" in wp or "POG_PHYS14_25ns_v2_ConvVeto" in wp or "POG_PHYS14_25ns_v2_ConvVetoDxyDz" in wp or "POG_SPRING15_25ns_v1" in wp or "POG_SPRING15_25ns_v1_ConvVeto" in wp or "POG_SPRING15_25ns_v1_ConvVetoDxyDz" in wp or "POG_SPRING15_50ns_v2" in wp or "POG_SPRING15_50ns_v2_ConvVeto" in wp or "POG_SPRING15_50ns_v2_ConvVetoDxyDz" in wp:
54  showerShapes = "full5x5"
55  vars = {
56  'dEtaIn' : abs(self.physObj.deltaEtaSuperClusterTrackAtVtx()),
57  'dPhiIn' : abs(self.physObj.deltaPhiSuperClusterTrackAtVtx()),
58  'sigmaIEtaIEta' : self.physObj.full5x5_sigmaIetaIeta() if showerShapes == "full5x5" else self.physObj.sigmaIetaIeta(),
59  'H/E' : self.physObj.hadronicOverEm(),
60  #'1/E-1/p' : abs(1.0/self.physObj.ecalEnergy() - self.physObj.eSuperClusterOverP()/self.physObj.ecalEnergy()),
61  '1/E-1/p' : abs(1.0/self.physObj.ecalEnergy() - self.physObj.eSuperClusterOverP()/self.physObj.ecalEnergy()) if self.physObj.ecalEnergy()>0. else 9e9,
62  'conversionVeto' : self.physObj.passConversionVeto(),
63  'missingHits' : self.physObj.gsfTrack().hitPattern().numberOfLostHits(ROOT.reco.HitPattern.MISSING_INNER_HITS), # http://cmslxr.fnal.gov/source/DataFormats/TrackReco/interface/HitPattern.h?v=CMSSW_7_2_3#0153
64  'dxy' : abs(self.dxy()),
65  'dz' : abs(self.dz()),
66  }
67  WP = {
68 
69  'POG_2012_Veto' : [('dEtaIn', [0.007, 0.01]), ('dPhiIn', [0.8, 0.7 ]), ('sigmaIEtaIEta', [0.01, 0.03]), ('H/E', [0.15, 9e9]), ('1/E-1/p', [9e9, 9e9])],
70  'POG_2012_Loose' : [('dEtaIn', [0.007, 0.009]), ('dPhiIn', [0.15, 0.1 ]), ('sigmaIEtaIEta', [0.01, 0.03]), ('H/E', [0.12, 0.1]), ('1/E-1/p', [0.05, 0.05])],
71  'POG_2012_Medium' : [('dEtaIn', [0.004, 0.007]), ('dPhiIn', [0.06, 0.03]), ('sigmaIEtaIEta', [0.01, 0.03]), ('H/E', [0.12, 0.1]), ('1/E-1/p', [0.05, 0.05])],
72  'POG_2012_Tight' : [('dEtaIn', [0.004, 0.005]), ('dPhiIn', [0.03, 0.02]), ('sigmaIEtaIEta', [0.01, 0.03]), ('H/E', [0.12, 0.1]), ('1/E-1/p', [0.05, 0.05])],
73  # RIC: in the EG POG WPs, isolation is included too. Here only the pure ID part.
74  # dz and d0 cuts are excluded here as well.
75 
76  'POG_CSA14_25ns_v1_Veto' : [('dEtaIn', [0.017938, 0.014569]), ('dPhiIn', [0.182958, 0.230914]), ('sigmaIEtaIEta', [0.012708, 0.036384]), ('H/E', [0.335015, 0.200792]), ('1/E-1/p', [0.198287, 0.146856])],
77  'POG_CSA14_25ns_v1_Loose' : [('dEtaIn', [0.014928, 0.013045]), ('dPhiIn', [0.141050, 0.149017]), ('sigmaIEtaIEta', [0.011304, 0.035536]), ('H/E', [0.127690, 0.107898]), ('1/E-1/p', [0.097806, 0.102261])],
78  'POG_CSA14_25ns_v1_Medium' : [('dEtaIn', [0.013071, 0.010006]), ('dPhiIn', [0.132113, 0.052321]), ('sigmaIEtaIEta', [0.010726, 0.032882]), ('H/E', [0.109761, 0.101755]), ('1/E-1/p', [0.032639, 0.041427])],
79  'POG_CSA14_25ns_v1_Tight' : [('dEtaIn', [0.012671, 0.008823]), ('dPhiIn', [0.025218, 0.027286]), ('sigmaIEtaIEta', [0.010061, 0.030222]), ('H/E', [0.065085, 0.090710]), ('1/E-1/p', [0.027873, 0.019404])],
80  'POG_CSA14_50ns_v1_Veto' : [('dEtaIn', [0.021, 0.028]), ('dPhiIn', [0.25 , 0.23 ]), ('sigmaIEtaIEta', [0.012, 0.035]), ('H/E', [0.24 , 0.19 ]), ('1/E-1/p', [0.32 , 0.13 ])],
81  'POG_CSA14_50ns_v1_Loose' : [('dEtaIn', [0.016, 0.025]), ('dPhiIn', [0.080, 0.097]), ('sigmaIEtaIEta', [0.012, 0.032]), ('H/E', [0.15 , 0.12 ]), ('1/E-1/p', [0.11 , 0.11 ])],
82  'POG_CSA14_50ns_v1_Medium' : [('dEtaIn', [0.015, 0.023]), ('dPhiIn', [0.051, 0.056]), ('sigmaIEtaIEta', [0.010, 0.030]), ('H/E', [0.10 , 0.099]), ('1/E-1/p', [0.053, 0.11 ])],
83  'POG_CSA14_50ns_v1_Tight' : [('dEtaIn', [0.012, 0.019]), ('dPhiIn', [0.024, 0.043]), ('sigmaIEtaIEta', [0.010, 0.029]), ('H/E', [0.074, 0.080]), ('1/E-1/p', [0.026, 0.076])],
84 
85  'POG_PHYS14_25ns_v1_Veto' : [('dEtaIn', [0.016315, 0.010671]), ('dPhiIn', [0.252044, 0.245263]), ('sigmaIEtaIEta', [0.011100 , 0.033987]), ('H/E', [0.345843, 0.134691]), ('1/E-1/p', [0.248070, 0.157160])],
86  'POG_PHYS14_25ns_v1_Loose' : [('dEtaIn', [0.012442, 0.010654]), ('dPhiIn', [0.072624, 0.145129]), ('sigmaIEtaIEta', [0.010557 , 0.032602]), ('H/E', [0.121476, 0.131862]), ('1/E-1/p', [0.221803, 0.142283])],
87  'POG_PHYS14_25ns_v1_Medium' : [('dEtaIn', [0.007641, 0.009285]), ('dPhiIn', [0.032643, 0.042447]), ('sigmaIEtaIEta', [0.010399 , 0.029524]), ('H/E', [0.060662, 0.104263]), ('1/E-1/p', [0.153897, 0.137468])],
88  'POG_PHYS14_25ns_v1_Tight' : [('dEtaIn', [0.006574, 0.005681]), ('dPhiIn', [0.022868, 0.032046]), ('sigmaIEtaIEta', [0.010181 , 0.028766]), ('H/E', [0.037553, 0.081902]), ('1/E-1/p', [0.131191, 0.106055])],
89 
90  'POG_PHYS14_25ns_v2_Veto' : [('dEtaIn', [0.013625, 0.011932]), ('dPhiIn', [0.230374, 0.255450]), ('sigmaIEtaIEta', [0.011586 , 0.031849]), ('H/E', [0.181130, 0.223870]), ('1/E-1/p', [0.295751, 0.155501])],
91  'POG_PHYS14_25ns_v2_Loose' : [('dEtaIn', [0.009277, 0.009833]), ('dPhiIn', [0.094739, 0.149934]), ('sigmaIEtaIEta', [0.010331 , 0.031838]), ('H/E', [0.093068, 0.115754]), ('1/E-1/p', [0.189968, 0.140662])],
92  'POG_PHYS14_25ns_v2_Medium' : [('dEtaIn', [0.008925, 0.007429]), ('dPhiIn', [0.035973, 0.067879]), ('sigmaIEtaIEta', [0.009996 , 0.030135]), ('H/E', [0.050537, 0.086782]), ('1/E-1/p', [0.091942, 0.100683])],
93  'POG_PHYS14_25ns_v2_Tight' : [('dEtaIn', [0.006046, 0.007057]), ('dPhiIn', [0.028092, 0.030159]), ('sigmaIEtaIEta', [0.009947 , 0.028237]), ('H/E', [0.045772, 0.067778]), ('1/E-1/p', [0.020118, 0.098919])],
94 
95  'POG_SPRING15_50ns_v2_Veto' : [('dEtaIn', [0.01260, 0.01090]), ('dPhiIn', [0.1070, 0.2190]), ('sigmaIEtaIEta', [0.0120, 0.0339]), ('H/E', [0.1860, 0.0962]), ('1/E-1/p', [0.2390, 0.141])],
96  'POG_SPRING15_50ns_v2_Loose' : [('dEtaIn', [0.00976, 0.00952]), ('dPhiIn', [0.0929, 0.1810]), ('sigmaIEtaIEta', [0.0105, 0.0318]), ('H/E', [0.0765, 0.0824]), ('1/E-1/p', [0.1840, 0.125])],
97  'POG_SPRING15_50ns_v2_Medium' : [('dEtaIn', [0.00940, 0.00773]), ('dPhiIn', [0.0296, 0.1480]), ('sigmaIEtaIEta', [0.0101, 0.0287]), ('H/E', [0.0372, 0.0546]), ('1/E-1/p', [0.1180, 0.104])],
98  'POG_SPRING15_50ns_v2_Tight' : [('dEtaIn', [0.00864, 0.00762]), ('dPhiIn', [0.0291, 0.0439]), ('sigmaIEtaIEta', [0.0101, 0.0287]), ('H/E', [0.0372, 0.0544]), ('1/E-1/p', [0.0116, 0.010])],
99  'POG_SPRING15_25ns_v1_Veto' : [('dEtaIn', [0.01520, 0.01130]), ('dPhiIn', [0.2160, 0.2370]), ('sigmaIEtaIEta', [0.0114, 0.0352]), ('H/E', [0.1810, 0.1160]), ('1/E-1/p', [0.2070, 0.17400])],
100  'POG_SPRING15_25ns_v1_Loose' : [('dEtaIn', [0.01050, 0.00814]), ('dPhiIn', [0.1150, 0.1820]), ('sigmaIEtaIEta', [0.0103, 0.0301]), ('H/E', [0.1040, 0.0897]), ('1/E-1/p', [0.1020, 0.12600])],
101  'POG_SPRING15_25ns_v1_Medium' : [('dEtaIn', [0.01030, 0.00733]), ('dPhiIn', [0.0336, 0.1140]), ('sigmaIEtaIEta', [0.0101, 0.0283]), ('H/E', [0.0876, 0.0678]), ('1/E-1/p', [0.0174, 0.08980])],
102  'POG_SPRING15_25ns_v1_Tight' : [('dEtaIn', [0.00926, 0.00724]), ('dPhiIn', [0.0336, 0.0918]), ('sigmaIEtaIEta', [0.0101, 0.0279]), ('H/E', [0.0597, 0.0615]), ('1/E-1/p', [0.0120, 0.00999])],
103 
104  }
105  WP_conversion_veto = {
106  # missing Hits incremented by 1 because we return False if >=, note the '='
107 
108  'POG_CSA14_25ns_v1_ConvVeto_Veto' : WP['POG_CSA14_25ns_v1_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
109  'POG_CSA14_25ns_v1_ConvVeto_Loose' : WP['POG_CSA14_25ns_v1_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
110  'POG_CSA14_25ns_v1_ConvVeto_Medium' : WP['POG_CSA14_25ns_v1_Medium']+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
111  'POG_CSA14_25ns_v1_ConvVeto_Tight' : WP['POG_CSA14_25ns_v1_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
112  'POG_CSA14_50ns_v1_ConvVeto_Veto' : WP['POG_CSA14_50ns_v1_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
113  'POG_CSA14_50ns_v1_ConvVeto_Loose' : WP['POG_CSA14_50ns_v1_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
114  'POG_CSA14_50ns_v1_ConvVeto_Medium' : WP['POG_CSA14_50ns_v1_Medium']+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
115  'POG_CSA14_50ns_v1_ConvVeto_Tight' : WP['POG_CSA14_50ns_v1_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
116 
117  'POG_PHYS14_25ns_v1_ConvVeto_Veto' : WP['POG_PHYS14_25ns_v1_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
118  'POG_PHYS14_25ns_v1_ConvVeto_Loose' : WP['POG_PHYS14_25ns_v1_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
119  'POG_PHYS14_25ns_v1_ConvVeto_Medium' : WP['POG_PHYS14_25ns_v1_Medium']+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
120  'POG_PHYS14_25ns_v1_ConvVeto_Tight' : WP['POG_PHYS14_25ns_v1_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
121 
122  'POG_PHYS14_25ns_v2_ConvVeto_Veto' : WP['POG_PHYS14_25ns_v2_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
123  'POG_PHYS14_25ns_v2_ConvVeto_Loose' : WP['POG_PHYS14_25ns_v2_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
124  'POG_PHYS14_25ns_v2_ConvVeto_Medium' : WP['POG_PHYS14_25ns_v2_Medium']+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
125  'POG_PHYS14_25ns_v2_ConvVeto_Tight' : WP['POG_PHYS14_25ns_v2_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [2, 2])],
126 
127  'POG_SPRING15_50ns_v2_ConvVeto_Veto' : WP['POG_SPRING15_50ns_v2_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
128  'POG_SPRING15_50ns_v2_ConvVeto_Loose' : WP['POG_SPRING15_50ns_v2_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
129  'POG_SPRING15_50ns_v2_ConvVeto_Medium' : WP['POG_SPRING15_50ns_v2_Medium']+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
130  'POG_SPRING15_50ns_v2_ConvVeto_Tight' : WP['POG_SPRING15_50ns_v2_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
131  'POG_SPRING15_25ns_v1_ConvVeto_Veto' : WP['POG_SPRING15_25ns_v1_Veto' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 4])],
132  'POG_SPRING15_25ns_v1_ConvVeto_Loose' : WP['POG_SPRING15_25ns_v1_Loose' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
133  'POG_SPRING15_25ns_v1_ConvVeto_Medium' : WP['POG_SPRING15_25ns_v1_Medium']+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
134  'POG_SPRING15_25ns_v1_ConvVeto_Tight' : WP['POG_SPRING15_25ns_v1_Tight' ]+[('conversionVeto', [True, True]), ('missingHits', [3, 2])],
135  }
136 
137  WP.update(WP_conversion_veto)
138 
139  WP_conversion_veto_DxyDz = {
140 
141  'POG_PHYS14_25ns_v1_ConvVetoDxyDz_Veto' : WP['POG_PHYS14_25ns_v1_ConvVeto_Veto' ]+[('dxy',[0.060279, 0.273097]), ('dz',[0.800538, 0.885860])],
142  'POG_PHYS14_25ns_v1_ConvVetoDxyDz_Loose' : WP['POG_PHYS14_25ns_v1_ConvVeto_Loose' ]+[('dxy',[0.022664, 0.097358]), ('dz',[0.173670, 0.198444])],
143  'POG_PHYS14_25ns_v1_ConvVetoDxyDz_Medium' : WP['POG_PHYS14_25ns_v1_ConvVeto_Medium']+[('dxy',[0.011811, 0.051682]), ('dz',[0.070775, 0.180720])],
144  'POG_PHYS14_25ns_v1_ConvVetoDxyDz_Tight' : WP['POG_PHYS14_25ns_v1_ConvVeto_Tight' ]+[('dxy',[0.009924, 0.027261]), ('dz',[0.015310, 0.147154])],
145 
146  'POG_PHYS14_25ns_v2_ConvVetoDxyDz_Veto' : WP['POG_PHYS14_25ns_v2_ConvVeto_Veto' ]+[('dxy',[0.094095, 0.342293]), ('dz',[0.713070, 0.953461])],
147  'POG_PHYS14_25ns_v2_ConvVetoDxyDz_Loose' : WP['POG_PHYS14_25ns_v2_ConvVeto_Loose' ]+[('dxy',[0.035904, 0.099266]), ('dz',[0.075496, 0.197897])],
148  'POG_PHYS14_25ns_v2_ConvVetoDxyDz_Medium' : WP['POG_PHYS14_25ns_v2_ConvVeto_Medium']+[('dxy',[0.012235, 0.036719]), ('dz',[0.042020, 0.138142])],
149  'POG_PHYS14_25ns_v2_ConvVetoDxyDz_Tight' : WP['POG_PHYS14_25ns_v2_ConvVeto_Tight' ]+[('dxy',[0.008790, 0.027984]), ('dz',[0.021226, 0.133431])],
150 
151  'POG_SPRING15_50ns_v2_ConvVetoDxyDz_Veto' : WP['POG_SPRING15_50ns_v2_ConvVeto_Veto' ]+[('dxy',[0.0621, 0.2790]), ('dz',[0.613, 0.947])],
152  'POG_SPRING15_50ns_v2_ConvVetoDxyDz_Loose' : WP['POG_SPRING15_50ns_v2_ConvVeto_Loose' ]+[('dxy',[0.0227, 0.2420]), ('dz',[0.379, 0.921])],
153  'POG_SPRING15_50ns_v2_ConvVetoDxyDz_Medium' : WP['POG_SPRING15_50ns_v2_ConvVeto_Medium']+[('dxy',[0.0151, 0.0535]), ('dz',[0.238, 0.572])],
154  'POG_SPRING15_50ns_v2_ConvVetoDxyDz_Tight' : WP['POG_SPRING15_50ns_v2_ConvVeto_Tight' ]+[('dxy',[0.0144, 0.0377]), ('dz',[0.170, 0.571])],
155  'POG_SPRING15_25ns_v1_ConvVetoDxyDz_Veto' : WP['POG_SPRING15_25ns_v1_ConvVeto_Veto' ]+[('dxy',[0.0564, 0.2220]), ('dz',[0.472, 0.921])],
156  'POG_SPRING15_25ns_v1_ConvVetoDxyDz_Loose' : WP['POG_SPRING15_25ns_v1_ConvVeto_Loose' ]+[('dxy',[0.0261, 0.1180]), ('dz',[0.410, 0.822])],
157  'POG_SPRING15_25ns_v1_ConvVetoDxyDz_Medium' : WP['POG_SPRING15_25ns_v1_ConvVeto_Medium']+[('dxy',[0.0118, 0.0739]), ('dz',[0.373, 0.602])],
158  'POG_SPRING15_25ns_v1_ConvVetoDxyDz_Tight' : WP['POG_SPRING15_25ns_v1_ConvVeto_Tight' ]+[('dxy',[0.0111, 0.0351]), ('dz',[0.0466,0.417])],
159  }
160 
161  WP.update(WP_conversion_veto_DxyDz)
162 
163 
164  if wp not in WP:
165  raise RuntimeError("Working point '%s' not yet implemented in Electron.py" % wp)
166  for (cut_name,(cut_eb,cut_ee)) in WP[wp]:
167  if cut_name == 'conversionVeto':
168  if (cut_eb if self.physObj.isEB() else cut_ee) and not vars[cut_name]:
169  return False
170  elif vars[cut_name] >= (cut_eb if self.physObj.isEB() else cut_ee):
171  return False
172  return True
173 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ dxy()

def Electron.Electron.dxy (   self,
  vertex = None 
)
Returns dxy.
Computed using vertex (or self.associatedVertex if vertex not specified),
and the gsf track.

Definition at line 368 of file Electron.py.

References Electron.Electron.associatedVertex, reco::Electron.gsfTrack(), reco::GsfElectronCore.gsfTrack(), reco::RecoCandidate.gsfTrack(), pat::Electron.gsfTrack(), pat::GenericParticle.gsfTrack(), and reco::GsfElectron.gsfTrack().

Referenced by Electron.Electron.cutBasedId(), and ntupleDataFormat.Track.dxyPull().

368  def dxy(self, vertex=None):
369  '''Returns dxy.
370  Computed using vertex (or self.associatedVertex if vertex not specified),
371  and the gsf track.
372  '''
373  if vertex is None:
374  vertex = self.associatedVertex
375  return self.gsfTrack().dxy( vertex.position() )
376 

◆ dz()

def Electron.Electron.dz (   self,
  vertex = None 
)
Returns dz.
Computed using vertex (or self.associatedVertex if vertex not specified),
and the gsf track.

Definition at line 387 of file Electron.py.

References Electron.Electron.associatedVertex, reco::Electron.gsfTrack(), reco::GsfElectronCore.gsfTrack(), reco::RecoCandidate.gsfTrack(), pat::Electron.gsfTrack(), pat::GenericParticle.gsfTrack(), and reco::GsfElectron.gsfTrack().

Referenced by Electron.Electron.cutBasedId(), and ntupleDataFormat.Track.dzPull().

387  def dz(self, vertex=None):
388  '''Returns dz.
389  Computed using vertex (or self.associatedVertex if vertex not specified),
390  and the gsf track.
391  '''
392  if vertex is None:
393  vertex = self.associatedVertex
394  return self.gsfTrack().dz( vertex.position() )
395 

◆ edxy()

def Electron.Electron.edxy (   self)
returns the uncertainty on dxy (from gsf track)

Definition at line 377 of file Electron.py.

References run3scouting_cff.dxyError, reco::Electron.gsfTrack(), reco::GsfElectronCore.gsfTrack(), reco::RecoCandidate.gsfTrack(), pat::Electron.gsfTrack(), pat::GenericParticle.gsfTrack(), and reco::GsfElectron.gsfTrack().

377  def edxy(self):
378  '''returns the uncertainty on dxy (from gsf track)'''
379  return self.gsfTrack().dxyError()
380 

◆ edz()

def Electron.Electron.edz (   self)
returns the uncertainty on dxz (from gsf track)

Definition at line 396 of file Electron.py.

References run3scouting_cff.dzError, reco::Electron.gsfTrack(), reco::GsfElectronCore.gsfTrack(), reco::RecoCandidate.gsfTrack(), pat::Electron.gsfTrack(), pat::GenericParticle.gsfTrack(), and reco::GsfElectron.gsfTrack().

396  def edz(self):
397  '''returns the uncertainty on dxz (from gsf track)'''
398  return self.gsfTrack().dzError()
399 
400 

◆ electronID()

def Electron.Electron.electronID (   self,
  id,
  vertex = None,
  rho = None 
)

Definition at line 24 of file Electron.py.

References Electron.Electron.associatedVertex, Electron.Electron.cutBasedId(), pat::Electron.electronIDs(), Electron.Electron.mvaIDLoose(), Electron.Electron.mvaIDRun2(), Electron.Electron.mvaIDTight(), Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

24  def electronID( self, id, vertex=None, rho=None ):
25  if id is None or id == "": return True
26  if vertex == None and hasattr(self,'associatedVertex') and self.associatedVertex != None: vertex = self.associatedVertex
27  if rho == None and hasattr(self,'rho') and self.rho != None: rho = self.rho
28  if id == "POG_MVA_ID_NonTrig": return self.mvaIDLoose()
29  elif id == "POG_MVA_ID_Trig": return self.mvaIDTight()
30  elif id == "POG_MVA_ID_NonTrig_full5x5": return self.mvaIDLoose(full5x5=True)
31  elif id == "POG_MVA_ID_Trig_full5x5": return self.mvaIDTight(full5x5=True)
32  elif id == "POG_MVA_ID_Phys14_NonTrig_VLoose": return self.mvaIDRun2("NonTrigPhys14","VLoose")
33  elif id == "POG_MVA_ID_Phys14_NonTrig_Loose": return self.mvaIDRun2("NonTrigPhys14","Loose")
34  elif id == "POG_MVA_ID_Phys14_NonTrig_Tight": return self.mvaIDRun2("NonTrigPhys14","Tight")
35  elif id == "POG_MVA_ID_Spring15_NonTrig_VLoose": return self.mvaIDRun2("NonTrigSpring15MiniAOD","VLoose")
36  elif id == "POG_MVA_ID_Spring15_NonTrig_VLooseIdEmu": return self.mvaIDRun2("NonTrigSpring15MiniAOD","VLooseIdEmu")
37  elif id == "POG_MVA_ID_Spring15_NonTrig_VLooseIdIsoEmu": return self.mvaIDRun2("NonTrigSpring15MiniAOD","VLooseIdIsoEmu")
38  elif id == "POG_MVA_ID_Spring15_NonTrig_Tight": return self.mvaIDRun2("NonTrigSpring15MiniAOD","Tight")
39  elif id == "MVA_ID_NonTrig_Phys14Fix_HZZ": return self.mvaIDRun2("NonTrigPhys14Fix","HZZ")
40  elif id == "MVA_ID_NonTrig_Spring15_HZZ": return self.mvaIDRun2("NonTrigSpring15MiniAOD","HZZ")
41  elif id.startswith("POG_Cuts_ID_"):
42  return self.cutBasedId(id.replace("POG_Cuts_ID_","POG_"))
43  for ID in self.electronIDs():
44  if ID.first == id:
45  return ID.second
46  raise RuntimeError("Electron id '%s' not yet implemented in Electron.py" % id)
47 
electronID
electronId to be used for probe the following types are available:

◆ lostInner()

def Electron.Electron.lostInner (   self)

Definition at line 401 of file Electron.py.

References reco::Electron.gsfTrack(), reco::GsfElectronCore.gsfTrack(), reco::RecoCandidate.gsfTrack(), pat::Electron.gsfTrack(), pat::GenericParticle.gsfTrack(), reco::GsfElectron.gsfTrack(), and TrackCollections2monitor_cff.numberOfLostHits.

401  def lostInner(self) :
402  if hasattr(self.gsfTrack(),"trackerExpectedHitsInner") :
403  return self.gsfTrack().trackerExpectedHitsInner().numberOfLostHits()
404  else :
405  return self.gsfTrack().hitPattern().numberOfLostHits(ROOT.reco.HitPattern.MISSING_INNER_HITS)
406 

◆ mvaId()

def Electron.Electron.mvaId (   self)

Definition at line 174 of file Electron.py.

References Electron.Electron.mvaNonTrigV0().

174  def mvaId( self ):
175  return self.mvaNonTrigV0()
176 

◆ mvaIDLoose()

def Electron.Electron.mvaIDLoose (   self,
  full5x5 = False 
)

Definition at line 227 of file Electron.py.

References funct.abs(), PVValHelper.eta, Electron.Electron.mvaNonTrigV0(), PuppiCandidate.pt, eetest::CandForTest.pt(), btagbtvdeep::TrackPairFeatures.pt, btagbtvdeep::SecondaryVertexFeatures.pt, btagbtvdeep::JetFeatures.pt, mypt.pt, btagbtvdeep::SeedingTrackFeatures.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), hi::TrackStructure.pt, res::HelperJet.pt(), mkfit::IdxChi2List.pt, reco::VoronoiBackground.pt(), ScoutingParticle.pt(), L1MuCSCPtLut.pt(), l1ScoutingRun3::ugmt::masksMuon.pt, l1ScoutingRun3::ugmt::shiftsMuon.pt, l1t::Vertex.pt(), l1tVertexFinder::L1Track.pt(), PtHatReweightUserHook.pt, btagbtvdeep::SeedingTrackInfoBuilder.pt(), MatchStruct.pt, ScoutingPhoton.pt(), btagbtvdeep::LostTracksFeatures.pt, btagbtvdeep::NeutralCandidateFeatures.pt, trklet::L1SimTrack.pt(), ALILine.pt(), RecoObj.pt, L2TauPixelTrackMatch::TinyTrack.pt, PtEtaPhiMass.pt(), reco::MuonMETCorrectionData.pt(), L1Analysis::L1AnalysisRecoPhotonDataFormat.pt, P2L1HTMHTEmu::PtPxPy.pt, ResonanceBuilder.Resonance.pt(), HLTGenValObject.pt(), MTDTrackQualityMVA.pt, Phase2L1GMT::ConvertedTTTrack.pt(), DTMuonLocalAlignment.pt, l1thgcfirmware::HGCalCluster.pt(), antiElecIDMVA6_blocks::TauVars.pt, l1ct::tdr_regionizer::PipeEntry< T >.pt(), PipeEntry< T >.pt(), l1thgcfirmware::HGCalTriggerCell.pt(), L1Analysis::L1AnalysisRecoTauDataFormat.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, Phase2L1GMT::PreTrackMatchedMuon.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, tmtt::TP.pt(), PGlobalSimHit::Trk.pt, HepLine3D.pt(), btagbtvdeep::ChargedCandidateFeatures.pt, mtd::MTDGeomUtil.pt(), trigger::TriggerObject.pt(), jpt::Map.pt(), PhysicsObjectsMonitor.pt, trklet::Track.pt(), l1gt::ThreeVector.pt, l1tVertexFinder::RecoVertex< T >.pt(), RecoVertex< L1Track >.pt(), RecoVertex<>.pt(), TtFullHadSignalSel.pt(), reco::CaloMuon.pt(), BSTrkParameters.pt(), MuScleFitMuon.pt(), PTrajectoryStateOnDet.pt(), trklet::L1TStub.pt(), reco::ForwardProton.pt(), Run3ScoutingCaloJet.pt(), SiStripLAProfileBooker.pt, ScoutingCaloJet.pt(), ScoutingElectron.pt(), l1tVertexFinder::VertexNTupler::GenJetsBranchData.pt, TrackBranch.pt, Run3ScoutingParticle.pt(), TauL1TPair.pt(), SimpleL1MuGMTCand.pt(), L1MuDTTrack.pt(), EopElecVariables.pt, HTrackVariables.pt(), L1MuBMTrack.pt(), susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.pt, TrajectoryStateClosestToPoint.pt(), BPhysicsValidation::ParticleMonitor.pt, L1TPhase2CorrelatorOffline::SimpleObject.pt, reco::PreId.pt(), Run3ScoutingPhoton.pt(), l1tp2::DigitizedClusterGT.pt(), Lepton.pt, Run3ScoutingPFJet.pt(), ScoutingPFJet.pt(), RecoTrackSetDefinition.pt, ValidationMisalignedTracker.pt, TrackerValidationVariables::AVTrackStruct.pt, Primary4DVertexValidation::simPrimaryVertex.pt, reco::Candidate.pt(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData.pt, egHLT::OffPho.pt(), MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::PFCluster.pt(), ScoutingMuon.pt(), tmtt::KFTrackletTrack.pt(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, reco::Particle.pt(), l1tp2::DigitizedClusterCorrelator.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), emtf::phase2::track_t.pt, Run3ScoutingElectron.pt(), CaloParticle.pt(), TrackStruct::TrackParameterStruct.pt, l1ct::tdr_regionizer::BufferEntry< T >.pt(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData.pt, reco::ParticleState.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), GenMuonGMTPair.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, TrackingParticle.pt(), HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), Primary4DVertexValidation::recoPrimaryVertex.pt, reco::LeafCandidate.pt(), l1t::TkJetWord.pt(), tmtt::L1track3D.pt(), L1Analysis::L1AnalysisRecoMuonDataFormat.pt, l1t::VertexWord.pt(), PtHatRapReweightUserHook.pt, l1ct::tdr_regionizer::Buffer< T >.pt(), Run3ScoutingMuon.pt(), L1NNCaloTauProducer::SimpleHGCluster.pt, l1t::TkTripletWord.pt(), CosmicRateAnalyzer.pt, MuonGmtPair.pt(), pixelTrack::QualityCutsT< TrackerTraits, pixelTopology::isPhase1Topology< TrackerTraits > >.pt, L1TPhase2CorrelatorOffline::McVars.pt, pat::MET::Vector2.pt(), RawParticle.pt(), l1t::EMTFTrack.pt, L1TPhase2CorrelatorOffline::RecoVars.pt, tmtt::L1fittedTrack.pt(), reco::TrackBase.pt(), L1NNCaloTauEmulator::SimpleHGCluster.pt, pat::PackedGenParticle.pt(), p2eg::SimpleCaloHit.pt(), L1CaloJetProducer::simpleL1obj.pt(), L1NNCaloTauEmulator::InputHGCluster.pt, L1EGCrystalClusterEmulatorProducer::SimpleCaloHit.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, trigger::EgammaObject.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::Electron.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::PhotonCore.superCluster(), reco::Photon.superCluster(), pat::Photon.superCluster(), pat::Electron.superCluster(), reco::SiStripElectron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

Referenced by Electron.Electron.electronID().

227  def mvaIDLoose(self, full5x5=False):
228  eta = abs(self.superCluster().eta())
229  if self.pt() < 10:
230  if (eta < 0.8) : return self.mvaNonTrigV0(full5x5) > +0.47;
231  elif (eta < 1.479): return self.mvaNonTrigV0(full5x5) > +0.004;
232  else : return self.mvaNonTrigV0(full5x5) > +0.295;
233  else:
234  if (eta < 0.8) : return self.mvaNonTrigV0(full5x5) > -0.34;
235  elif (eta < 1.479): return self.mvaNonTrigV0(full5x5) > -0.65;
236  else : return self.mvaNonTrigV0(full5x5) > +0.60;
237 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ mvaIDRun2()

def Electron.Electron.mvaIDRun2 (   self,
  name,
  wp 
)

Definition at line 238 of file Electron.py.

References funct.abs(), PVValHelper.eta, Electron.Electron.mvaRun2(), PuppiCandidate.pt, eetest::CandForTest.pt(), btagbtvdeep::JetFeatures.pt, btagbtvdeep::SecondaryVertexFeatures.pt, btagbtvdeep::TrackPairFeatures.pt, mypt.pt, btagbtvdeep::SeedingTrackFeatures.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), hi::TrackStructure.pt, res::HelperJet.pt(), mkfit::IdxChi2List.pt, reco::VoronoiBackground.pt(), ScoutingParticle.pt(), l1ScoutingRun3::ugmt::masksMuon.pt, L1MuCSCPtLut.pt(), l1ScoutingRun3::ugmt::shiftsMuon.pt, l1t::Vertex.pt(), l1tVertexFinder::L1Track.pt(), PtHatReweightUserHook.pt, btagbtvdeep::SeedingTrackInfoBuilder.pt(), MatchStruct.pt, ScoutingPhoton.pt(), btagbtvdeep::LostTracksFeatures.pt, btagbtvdeep::NeutralCandidateFeatures.pt, trklet::L1SimTrack.pt(), ALILine.pt(), RecoObj.pt, L2TauPixelTrackMatch::TinyTrack.pt, PtEtaPhiMass.pt(), reco::MuonMETCorrectionData.pt(), L1Analysis::L1AnalysisRecoPhotonDataFormat.pt, P2L1HTMHTEmu::PtPxPy.pt, ResonanceBuilder.Resonance.pt(), HLTGenValObject.pt(), MTDTrackQualityMVA.pt, Phase2L1GMT::ConvertedTTTrack.pt(), DTMuonLocalAlignment.pt, l1thgcfirmware::HGCalCluster.pt(), l1ct::tdr_regionizer::PipeEntry< T >.pt(), antiElecIDMVA6_blocks::TauVars.pt, PipeEntry< T >.pt(), l1thgcfirmware::HGCalTriggerCell.pt(), L1Analysis::L1AnalysisRecoTauDataFormat.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, Phase2L1GMT::PreTrackMatchedMuon.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, tmtt::TP.pt(), PGlobalSimHit::Trk.pt, HepLine3D.pt(), btagbtvdeep::ChargedCandidateFeatures.pt, mtd::MTDGeomUtil.pt(), trigger::TriggerObject.pt(), jpt::Map.pt(), PhysicsObjectsMonitor.pt, trklet::Track.pt(), l1gt::ThreeVector.pt, l1tVertexFinder::RecoVertex< T >.pt(), RecoVertex< L1Track >.pt(), RecoVertex<>.pt(), TtFullHadSignalSel.pt(), reco::CaloMuon.pt(), BSTrkParameters.pt(), MuScleFitMuon.pt(), trklet::L1TStub.pt(), PTrajectoryStateOnDet.pt(), reco::ForwardProton.pt(), Run3ScoutingCaloJet.pt(), SiStripLAProfileBooker.pt, ScoutingCaloJet.pt(), ScoutingElectron.pt(), l1tVertexFinder::VertexNTupler::GenJetsBranchData.pt, Run3ScoutingParticle.pt(), TrackBranch.pt, TauL1TPair.pt(), SimpleL1MuGMTCand.pt(), L1MuDTTrack.pt(), EopElecVariables.pt, HTrackVariables.pt(), L1MuBMTrack.pt(), susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.pt, BPhysicsValidation::ParticleMonitor.pt, TrajectoryStateClosestToPoint.pt(), L1TPhase2CorrelatorOffline::SimpleObject.pt, reco::PreId.pt(), Run3ScoutingPhoton.pt(), l1tp2::DigitizedClusterGT.pt(), Lepton.pt, Run3ScoutingPFJet.pt(), ScoutingPFJet.pt(), RecoTrackSetDefinition.pt, ValidationMisalignedTracker.pt, TrackerValidationVariables::AVTrackStruct.pt, Primary4DVertexValidation::simPrimaryVertex.pt, reco::Candidate.pt(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData.pt, egHLT::OffPho.pt(), MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::PFCluster.pt(), ScoutingMuon.pt(), tmtt::KFTrackletTrack.pt(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, reco::Particle.pt(), l1tp2::DigitizedClusterCorrelator.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), emtf::phase2::track_t.pt, Run3ScoutingElectron.pt(), TrackStruct::TrackParameterStruct.pt, CaloParticle.pt(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData.pt, l1ct::tdr_regionizer::BufferEntry< T >.pt(), reco::ParticleState.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, GenMuonGMTPair.pt(), TrackingParticle.pt(), HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), Primary4DVertexValidation::recoPrimaryVertex.pt, reco::LeafCandidate.pt(), l1t::TkJetWord.pt(), tmtt::L1track3D.pt(), L1Analysis::L1AnalysisRecoMuonDataFormat.pt, l1t::VertexWord.pt(), PtHatRapReweightUserHook.pt, l1ct::tdr_regionizer::Buffer< T >.pt(), Run3ScoutingMuon.pt(), l1t::TkTripletWord.pt(), L1NNCaloTauProducer::SimpleHGCluster.pt, CosmicRateAnalyzer.pt, MuonGmtPair.pt(), pixelTrack::QualityCutsT< TrackerTraits, pixelTopology::isPhase1Topology< TrackerTraits > >.pt, L1TPhase2CorrelatorOffline::McVars.pt, RawParticle.pt(), pat::MET::Vector2.pt(), l1t::EMTFTrack.pt, L1TPhase2CorrelatorOffline::RecoVars.pt, tmtt::L1fittedTrack.pt(), reco::TrackBase.pt(), L1NNCaloTauEmulator::SimpleHGCluster.pt, pat::PackedGenParticle.pt(), p2eg::SimpleCaloHit.pt(), L1CaloJetProducer::simpleL1obj.pt(), L1NNCaloTauEmulator::InputHGCluster.pt, L1EGCrystalClusterEmulatorProducer::SimpleCaloHit.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, trigger::EgammaObject.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::Electron.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::PhotonCore.superCluster(), reco::Photon.superCluster(), pat::Photon.superCluster(), pat::Electron.superCluster(), reco::SiStripElectron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

Referenced by Electron.Electron.electronID().

238  def mvaIDRun2(self, name, wp):
239  eta = abs(self.superCluster().eta())
240  if name == "NonTrigPhys14":
241  if wp=="Loose":
242  if (eta < 0.8) : return self.mvaRun2(name) > +0.35;
243  elif (eta < 1.479): return self.mvaRun2(name) > +0.20;
244  else : return self.mvaRun2(name) > -0.52;
245  elif wp=="VLoose":
246  if (eta < 0.8) : return self.mvaRun2(name) > -0.11;
247  elif (eta < 1.479): return self.mvaRun2(name) > -0.35;
248  else : return self.mvaRun2(name) > -0.55;
249  elif wp=="Tight":
250  if (eta < 0.8) : return self.mvaRun2(name) > 0.73;
251  elif (eta < 1.479): return self.mvaRun2(name) > 0.57;
252  else : return self.mvaRun2(name) > 0.05;
253  else: raise RuntimeError("Ele MVA ID Working point not found")
254  elif name == "NonTrigPhys14Fix":
255  if wp == "HZZ":
256  if self.pt() <= 10:
257  if eta < 0.8 : return self.mvaRun2(name) > -0.586;
258  elif eta < 1.479: return self.mvaRun2(name) > -0.712;
259  else : return self.mvaRun2(name) > -0.662;
260  else:
261  if eta < 0.8 : return self.mvaRun2(name) > -0.652;
262  elif eta < 1.479: return self.mvaRun2(name) > -0.701;
263  else : return self.mvaRun2(name) > -0.350;
264  else: raise RuntimeError("Ele MVA ID Working point not found")
265  elif name in ("NonTrigSpring15","NonTrigSpring15MiniAOD"):
266  if wp=="VLoose":
267  if self.pt() <= 10:
268  if (eta < 0.8) : return self.mvaRun2(name) > -0.11;
269  elif (eta < 1.479): return self.mvaRun2(name) > -0.55;
270  else : return self.mvaRun2(name) > -0.60;
271  else:
272  if (eta < 0.8) : return self.mvaRun2(name) > -0.16;
273  elif (eta < 1.479): return self.mvaRun2(name) > -0.65;
274  else : return self.mvaRun2(name) > -0.74;
275  elif wp=="VLooseIdEmu":
276  if (eta < 0.8) : return self.mvaRun2(name) > -0.70;
277  elif (eta < 1.479): return self.mvaRun2(name) > -0.83;
278  else : return self.mvaRun2(name) > -0.92;
279  elif wp=="VLooseIdIsoEmu":
280  if (eta < 0.8) : return self.mvaRun2(name) > -0.155;
281  elif (eta < 1.479): return self.mvaRun2(name) > -0.56;
282  else : return self.mvaRun2(name) > -0.76;
283  elif wp=="Tight":
284  if (eta < 0.8) : return self.mvaRun2(name) > 0.87;
285  elif (eta < 1.479): return self.mvaRun2(name) > 0.60;
286  else : return self.mvaRun2(name) > 0.17;
287  elif wp == "HZZ":
288  if self.pt() <= 10:
289  if eta < 0.8 : return self.mvaRun2(name) > -0.265;
290  elif eta < 1.479: return self.mvaRun2(name) > -0.556;
291  else : return self.mvaRun2(name) > -0.551;
292  else:
293  if eta < 0.8 : return self.mvaRun2(name) > -0.072;
294  elif eta < 1.479: return self.mvaRun2(name) > -0.286;
295  else : return self.mvaRun2(name) > -0.267;
296  elif wp == "POG80":
297  if self.pt() > 10.:
298  if eta < 0.8: return self.mvaRun2(name) > 0.967083
299  elif eta < 1.479: return self.mvaRun2(name) > 0.929117
300  else: return self.mvaRun2(name) > 0.726311
301  else: # pt <= 10
302  if eta < 0.8: return self.mvaRun2(name) > 0.287435
303  elif eta < 1.479: return self.mvaRun2(name) > 0.221846
304  else: return self.mvaRun2(name) > -0.303263
305  elif wp == "POG90":
306  if self.pt() > 10.:
307  if eta < 0.8: return self.mvaRun2(name) > 0.913286
308  elif eta < 1.479: return self.mvaRun2(name) > 0.805013
309  else: return self.mvaRun2(name) > 0.358969
310  else: # pt <= 10
311  if eta < 0.8: return self.mvaRun2(name) > -0.083313
312  elif eta < 1.479: return self.mvaRun2(name) > -0.235222
313  else: return self.mvaRun2(name) > -0.67099
314  else: raise RuntimeError("Ele MVA ID Working point not found")
315  else: raise RuntimeError("Ele MVA ID type not found")
316 
317 
318 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ mvaIDTight()

def Electron.Electron.mvaIDTight (   self,
  full5x5 = False 
)

Definition at line 216 of file Electron.py.

References funct.abs(), PVValHelper.eta, Electron.Electron.mvaTrigV0(), PuppiCandidate.pt, eetest::CandForTest.pt(), btagbtvdeep::TrackPairFeatures.pt, btagbtvdeep::SecondaryVertexFeatures.pt, btagbtvdeep::JetFeatures.pt, mypt.pt, btagbtvdeep::SeedingTrackFeatures.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), hi::TrackStructure.pt, res::HelperJet.pt(), mkfit::IdxChi2List.pt, reco::VoronoiBackground.pt(), ScoutingParticle.pt(), L1MuCSCPtLut.pt(), l1ScoutingRun3::ugmt::masksMuon.pt, l1ScoutingRun3::ugmt::shiftsMuon.pt, l1t::Vertex.pt(), l1tVertexFinder::L1Track.pt(), PtHatReweightUserHook.pt, btagbtvdeep::SeedingTrackInfoBuilder.pt(), MatchStruct.pt, ScoutingPhoton.pt(), btagbtvdeep::LostTracksFeatures.pt, btagbtvdeep::NeutralCandidateFeatures.pt, trklet::L1SimTrack.pt(), ALILine.pt(), RecoObj.pt, L2TauPixelTrackMatch::TinyTrack.pt, PtEtaPhiMass.pt(), reco::MuonMETCorrectionData.pt(), L1Analysis::L1AnalysisRecoPhotonDataFormat.pt, P2L1HTMHTEmu::PtPxPy.pt, ResonanceBuilder.Resonance.pt(), HLTGenValObject.pt(), MTDTrackQualityMVA.pt, Phase2L1GMT::ConvertedTTTrack.pt(), DTMuonLocalAlignment.pt, l1thgcfirmware::HGCalCluster.pt(), antiElecIDMVA6_blocks::TauVars.pt, l1ct::tdr_regionizer::PipeEntry< T >.pt(), PipeEntry< T >.pt(), l1thgcfirmware::HGCalTriggerCell.pt(), L1Analysis::L1AnalysisRecoTauDataFormat.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, Phase2L1GMT::PreTrackMatchedMuon.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, tmtt::TP.pt(), PGlobalSimHit::Trk.pt, HepLine3D.pt(), btagbtvdeep::ChargedCandidateFeatures.pt, mtd::MTDGeomUtil.pt(), trigger::TriggerObject.pt(), jpt::Map.pt(), PhysicsObjectsMonitor.pt, trklet::Track.pt(), l1gt::ThreeVector.pt, l1tVertexFinder::RecoVertex< T >.pt(), RecoVertex< L1Track >.pt(), RecoVertex<>.pt(), TtFullHadSignalSel.pt(), reco::CaloMuon.pt(), BSTrkParameters.pt(), MuScleFitMuon.pt(), PTrajectoryStateOnDet.pt(), trklet::L1TStub.pt(), reco::ForwardProton.pt(), Run3ScoutingCaloJet.pt(), SiStripLAProfileBooker.pt, ScoutingCaloJet.pt(), ScoutingElectron.pt(), l1tVertexFinder::VertexNTupler::GenJetsBranchData.pt, TrackBranch.pt, Run3ScoutingParticle.pt(), TauL1TPair.pt(), SimpleL1MuGMTCand.pt(), L1MuDTTrack.pt(), EopElecVariables.pt, HTrackVariables.pt(), L1MuBMTrack.pt(), susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.pt, TrajectoryStateClosestToPoint.pt(), BPhysicsValidation::ParticleMonitor.pt, L1TPhase2CorrelatorOffline::SimpleObject.pt, reco::PreId.pt(), Run3ScoutingPhoton.pt(), l1tp2::DigitizedClusterGT.pt(), Lepton.pt, Run3ScoutingPFJet.pt(), ScoutingPFJet.pt(), RecoTrackSetDefinition.pt, ValidationMisalignedTracker.pt, TrackerValidationVariables::AVTrackStruct.pt, Primary4DVertexValidation::simPrimaryVertex.pt, reco::Candidate.pt(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData.pt, egHLT::OffPho.pt(), MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::PFCluster.pt(), ScoutingMuon.pt(), tmtt::KFTrackletTrack.pt(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, reco::Particle.pt(), l1tp2::DigitizedClusterCorrelator.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), emtf::phase2::track_t.pt, Run3ScoutingElectron.pt(), CaloParticle.pt(), TrackStruct::TrackParameterStruct.pt, l1ct::tdr_regionizer::BufferEntry< T >.pt(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData.pt, reco::ParticleState.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), GenMuonGMTPair.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, TrackingParticle.pt(), HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), Primary4DVertexValidation::recoPrimaryVertex.pt, reco::LeafCandidate.pt(), l1t::TkJetWord.pt(), tmtt::L1track3D.pt(), L1Analysis::L1AnalysisRecoMuonDataFormat.pt, l1t::VertexWord.pt(), PtHatRapReweightUserHook.pt, l1ct::tdr_regionizer::Buffer< T >.pt(), Run3ScoutingMuon.pt(), L1NNCaloTauProducer::SimpleHGCluster.pt, l1t::TkTripletWord.pt(), CosmicRateAnalyzer.pt, MuonGmtPair.pt(), pixelTrack::QualityCutsT< TrackerTraits, pixelTopology::isPhase1Topology< TrackerTraits > >.pt, L1TPhase2CorrelatorOffline::McVars.pt, pat::MET::Vector2.pt(), RawParticle.pt(), l1t::EMTFTrack.pt, L1TPhase2CorrelatorOffline::RecoVars.pt, tmtt::L1fittedTrack.pt(), reco::TrackBase.pt(), L1NNCaloTauEmulator::SimpleHGCluster.pt, pat::PackedGenParticle.pt(), p2eg::SimpleCaloHit.pt(), L1CaloJetProducer::simpleL1obj.pt(), L1NNCaloTauEmulator::InputHGCluster.pt, L1EGCrystalClusterEmulatorProducer::SimpleCaloHit.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, trigger::EgammaObject.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::Electron.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::PhotonCore.superCluster(), reco::Photon.superCluster(), pat::Photon.superCluster(), pat::Electron.superCluster(), reco::SiStripElectron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

Referenced by Electron.Electron.electronID().

216  def mvaIDTight(self, full5x5=False):
217  eta = abs(self.superCluster().eta())
218  if self.pt() < 20:
219  if (eta < 0.8) : return self.mvaTrigV0(full5x5) > +0.00;
220  elif (eta < 1.479): return self.mvaTrigV0(full5x5) > +0.10;
221  else : return self.mvaTrigV0(full5x5) > +0.62;
222  else:
223  if (eta < 0.8) : return self.mvaTrigV0(full5x5) > +0.94;
224  elif (eta < 1.479): return self.mvaTrigV0(full5x5) > +0.85;
225  else : return self.mvaTrigV0(full5x5) > +0.92;
226 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ mvaNonTrigV0()

def Electron.Electron.mvaNonTrigV0 (   self,
  full5x5 = False,
  debug = False 
)

Definition at line 180 of file Electron.py.

References Electron.Electron._mvaNonTrigV0, Electron.Electron.associatedVertex, ElectronMVAID.ElectronMVAID_NonTrig, PhysicsObject.PhysicsObject.physObj, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Electron.Electron.mvaId(), and Electron.Electron.mvaIDLoose().

180  def mvaNonTrigV0( self, full5x5=False, debug = False ):
181  if self._mvaNonTrigV0[full5x5] == None:
182  if self.associatedVertex == None: raise RuntimeError("You need to set electron.associatedVertex before calling any MVA")
183  if self.rho == None: raise RuntimeError("You need to set electron.rho before calling any MVA")
184  self._mvaNonTrigV0[full5x5] = ElectronMVAID_NonTrig(self.physObj, self.associatedVertex, self.rho, full5x5, debug)
185  return self._mvaNonTrigV0[full5x5]
186 

◆ mvaRun2()

def Electron.Electron.mvaRun2 (   self,
  name,
  debug = False 
)

Definition at line 201 of file Electron.py.

References Electron.Electron._mvaRun2, Electron.Electron.associatedVertex, PhysicsObject.PhysicsObject.physObj, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Electron.Electron.mvaIDRun2().

201  def mvaRun2( self, name, debug = False ):
202  if name not in self._mvaRun2:
203  if name == "NonTrigSpring15MiniAOD" and self.physObj.hasUserFloat("ElectronMVAEstimatorRun2Spring15NonTrig25nsV1Values"):
204  self._mvaRun2[name] = self.physObj.userFloat("ElectronMVAEstimatorRun2Spring15NonTrig25nsV1Values")
205  return self._mvaRun2[name]
206  if name not in ElectronMVAID_ByName: raise RuntimeError("Unknown electron run2 mva id %s (known ones are: %s)\n" % (name, ElectronMVAID_ByName.keys()))
207  if self.associatedVertex == None: raise RuntimeError("You need to set electron.associatedVertex before calling any MVA")
208  if self.rho == None: raise RuntimeError("You need to set electron.rho before calling any MVA")
209  # -v---- below is correct in Heppy 74X, but probably not functional anyway
210  self._mvaRun2[name] = ElectronMVAID_ByName[name](self.physObj, self.associatedVertex, self.rho, True, debug)
211  # -v---- below would be correct for CMGTools 74X witht the updated Spring15 MVA electron ID
212  #if self.event == None: raise RuntimeError, "You need to set electron.event before calling any MVA"
213  #self._mvaRun2[name] = ElectronMVAID_ByName[name](self.physObj, self.associatedVertex, self.event, self.rho, True, debug)
214  return self._mvaRun2[name]
215 

◆ mvaTrigNoIPV0()

def Electron.Electron.mvaTrigNoIPV0 (   self,
  full5x5 = False,
  debug = False 
)

Definition at line 194 of file Electron.py.

References Electron.Electron._mvaTrigNoIPV0, Electron.Electron.associatedVertex, ElectronMVAID.ElectronMVAID_TrigNoIP, PhysicsObject.PhysicsObject.physObj, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

194  def mvaTrigNoIPV0( self, full5x5=False, debug = False ):
195  if self._mvaTrigNoIPV0[full5x5] == None:
196  if self.associatedVertex == None: raise RuntimeError("You need to set electron.associatedVertex before calling any MVA")
197  if self.rho == None: raise RuntimeError("You need to set electron.rho before calling any MVA")
198  self._mvaTrigNoIPV0[full5x5] = ElectronMVAID_TrigNoIP(self.physObj, self.associatedVertex, self.rho, full5x5, debug)
199  return self._mvaTrigNoIPV0[full5x5]
200 

◆ mvaTrigV0()

def Electron.Electron.mvaTrigV0 (   self,
  full5x5 = False,
  debug = False 
)

Definition at line 187 of file Electron.py.

References Electron.Electron._mvaTrigV0, Electron.Electron.associatedVertex, ElectronMVAID.ElectronMVAID_Trig, PhysicsObject.PhysicsObject.physObj, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Electron.Electron.mvaIDTight().

187  def mvaTrigV0( self, full5x5=False, debug = False ):
188  if self._mvaTrigV0[full5x5] == None:
189  if self.associatedVertex == None: raise RuntimeError("You need to set electron.associatedVertex before calling any MVA")
190  if self.rho == None: raise RuntimeError("You need to set electron.rho before calling any MVA")
191  self._mvaTrigV0[full5x5] = ElectronMVAID_Trig(self.physObj, self.associatedVertex, self.rho, full5x5, debug)
192  return self._mvaTrigV0[full5x5]
193 

◆ neutralHadronIsoR()

def Electron.Electron.neutralHadronIsoR (   self,
  R = 0.4 
)

Definition at line 324 of file Electron.py.

References gedPhotonSequence_cff.neutralHadronIso, and PhysicsObject.PhysicsObject.physObj.

Referenced by Lepton.Lepton.absIsoR(), Muon.Muon.absIsoWithFSR(), and Electron.Electron.absIsoWithFSR().

324  def neutralHadronIsoR(self,R=0.4):
325  if R == 0.3: return self.physObj.pfIsolationVariables().sumNeutralHadronEt
326  elif R == 0.4: return self.physObj.neutralHadronIso()
327  raise RuntimeError("Electron neutralHadronIso missing for R=%s" % R)
328 

◆ p4()

def Electron.Electron.p4 (   self)

Definition at line 381 of file Electron.py.

References PhysicsObject.PhysicsObject.physObj.

Referenced by Tau.Tau.dxy_approx(), Tau.Tau.dz(), and Lepton.Lepton.p4WithFSR().

381  def p4(self):
382  return ROOT.reco.Candidate.p4(self.physObj)
383 
384 # def p4(self):
385 # return self.physObj.p4(self.physObj.candidateP4Kind()) # if kind == None else kind)
386 

◆ photonIsoR()

def Electron.Electron.photonIsoR (   self,
  R = 0.4 
)

Definition at line 329 of file Electron.py.

References gedPhotonSequence_cff.photonIso, and PhysicsObject.PhysicsObject.physObj.

Referenced by Lepton.Lepton.absIsoR(), Muon.Muon.absIsoWithFSR(), and Electron.Electron.absIsoWithFSR().

329  def photonIsoR(self,R=0.4):
330  if R == 0.3: return self.physObj.pfIsolationVariables().sumPhotonEt
331  elif R == 0.4: return self.physObj.photonIso()
332  raise RuntimeError("Electron photonIso missing for R=%s" % R)
333 

◆ ptErr()

def Electron.Electron.ptErr (   self)

Definition at line 411 of file Electron.py.

References reco::GsfElectron::Corrections.candidateP4Kind, reco::GsfElectron.candidateP4Kind(), mayown_ptr< T, N >.p, mayown_ptr< T >.p, edm::ConfigurationHandshake.p, EventShape.p, LMFSextuple.p, Exhume::Particle.p, funct::IntegralStruct< F, X >.p, funct::IntegralStruct< F >.p, DDHtmlFormatter.p(), DTMuonLocalAlignment.p, StripCPE::AlgoParam.p, PPSDiamondG4Hit.p(), reco::CaloMuon.p(), gctpf::GCTEtaStripPeak_t.p, EopElecVariables.p, trigger::TriggerObject.p(), gctpf::GCTEtaHFStripPeak_t.p, reco::ForwardProton.p(), PtHatEmpReweightUserHook.p, TotemRPG4Hit.p(), HTrackVariables.p(), susybsm::HSCParticle.p(), reco::Candidate.p(), BPhysicsValidation::ParticleMonitor.p, ValidationMisalignedTracker.p, PPSPixelG4Hit.p(), hitfit::Lepjets_Event_Lep.p(), gen.p, TrackerValidationVariables::AVTrackStruct.p, mkfit::TrackState.p(), CaloParticle.p(), reco::Particle.p(), hitfit::FE_Obj.p, SimCluster.p(), funct::SimpifyS2C2Sum< n, m, A, false >.p, TrackingParticle.p(), reco::ParticleState.p(), sistrip::SpyEventMatcher::CountersWrapper.p, reco::LeafCandidate.p(), CandidateWithRef< Ref >.p(), HGCalClusterT< C >.p(), TrackStruct::TrackParameterStruct.p, EMECALShowerParametrization.p(), CaloTower.p(), L1Analysis::L1AnalysisRecoMuonDataFormat.p, mkfit::TrackBase.p(), CosmicRateAnalyzer.p, pat::PackedGenParticle.p(), reco::TrackBase.p(), pat::PackedCandidate.p(), trackerTFP::Stub< Ts >.p(), trackerTFP::Stub< double, double, double, int, int, int, int, int, int, int >.p(), trackerTFP::Stub< double, double, double, int, int, int >.p(), trackerTFP::Stub< double, double, double, int, int, int, int >.p(), trackerTFP::Stub< double, double, double, int, TTBV, int, int, int, int >.p(), trackerTFP::Stub< double, double, double, double, double >.p(), trackerTFP::Stub< double, double, double, int, int, int, int, int >.p(), Stub< Others... >.p(), trackerTFP::Track< int, int, int, double, double, double, double >.p(), trackerTFP::Track< Ts >.p(), trackerTFP::Track< double, double, double, double >.p(), trackerTFP::Track< TTBV, int, int, double, double, double, double >.p(), Track< Others... >.p(), Config.TestModuleCommand.p, reco::GsfElectron.p4Error(), PuppiCandidate.pt, eetest::CandForTest.pt(), btagbtvdeep::JetFeatures.pt, btagbtvdeep::SecondaryVertexFeatures.pt, btagbtvdeep::TrackPairFeatures.pt, mypt.pt, btagbtvdeep::SeedingTrackFeatures.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), hi::TrackStructure.pt, res::HelperJet.pt(), mkfit::IdxChi2List.pt, reco::VoronoiBackground.pt(), ScoutingParticle.pt(), l1ScoutingRun3::ugmt::shiftsMuon.pt, l1ScoutingRun3::ugmt::masksMuon.pt, L1MuCSCPtLut.pt(), l1t::Vertex.pt(), l1tVertexFinder::L1Track.pt(), PtHatReweightUserHook.pt, btagbtvdeep::SeedingTrackInfoBuilder.pt(), MatchStruct.pt, ScoutingPhoton.pt(), trklet::L1SimTrack.pt(), ALILine.pt(), btagbtvdeep::NeutralCandidateFeatures.pt, btagbtvdeep::LostTracksFeatures.pt, RecoObj.pt, PtEtaPhiMass.pt(), L2TauPixelTrackMatch::TinyTrack.pt, reco::MuonMETCorrectionData.pt(), L1Analysis::L1AnalysisRecoPhotonDataFormat.pt, P2L1HTMHTEmu::PtPxPy.pt, ResonanceBuilder.Resonance.pt(), HLTGenValObject.pt(), MTDTrackQualityMVA.pt, DTMuonLocalAlignment.pt, Phase2L1GMT::ConvertedTTTrack.pt(), l1thgcfirmware::HGCalCluster.pt(), PipeEntry< T >.pt(), antiElecIDMVA6_blocks::TauVars.pt, l1ct::tdr_regionizer::PipeEntry< T >.pt(), L1Analysis::L1AnalysisRecoTauDataFormat.pt, l1thgcfirmware::HGCalTriggerCell.pt(), L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, Phase2L1GMT::PreTrackMatchedMuon.pt(), tmtt::TP.pt(), HepLine3D.pt(), PGlobalSimHit::Trk.pt, btagbtvdeep::ChargedCandidateFeatures.pt, mtd::MTDGeomUtil.pt(), trigger::TriggerObject.pt(), jpt::Map.pt(), PhysicsObjectsMonitor.pt, trklet::Track.pt(), l1gt::ThreeVector.pt, RecoVertex<>.pt(), l1tVertexFinder::RecoVertex< T >.pt(), RecoVertex< L1Track >.pt(), TtFullHadSignalSel.pt(), reco::CaloMuon.pt(), BSTrkParameters.pt(), MuScleFitMuon.pt(), trklet::L1TStub.pt(), PTrajectoryStateOnDet.pt(), SiStripLAProfileBooker.pt, ScoutingCaloJet.pt(), l1tVertexFinder::VertexNTupler::GenJetsBranchData.pt, ScoutingElectron.pt(), reco::ForwardProton.pt(), Run3ScoutingCaloJet.pt(), Run3ScoutingParticle.pt(), TauL1TPair.pt(), TrackBranch.pt, SimpleL1MuGMTCand.pt(), L1MuDTTrack.pt(), EopElecVariables.pt, HTrackVariables.pt(), L1MuBMTrack.pt(), susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.pt, TrajectoryStateClosestToPoint.pt(), BPhysicsValidation::ParticleMonitor.pt, L1TPhase2CorrelatorOffline::SimpleObject.pt, reco::PreId.pt(), Run3ScoutingPhoton.pt(), l1tp2::DigitizedClusterGT.pt(), Lepton.pt, Run3ScoutingPFJet.pt(), ScoutingPFJet.pt(), RecoTrackSetDefinition.pt, ValidationMisalignedTracker.pt, TrackerValidationVariables::AVTrackStruct.pt, Primary4DVertexValidation::simPrimaryVertex.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::PFCluster.pt(), ScoutingMuon.pt(), tmtt::KFTrackletTrack.pt(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, reco::Particle.pt(), l1tp2::DigitizedClusterCorrelator.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), emtf::phase2::track_t.pt, Run3ScoutingElectron.pt(), TrackStruct::TrackParameterStruct.pt, CaloParticle.pt(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData.pt, l1ct::tdr_regionizer::BufferEntry< T >.pt(), reco::ParticleState.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), GenMuonGMTPair.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, TrackingParticle.pt(), HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), Primary4DVertexValidation::recoPrimaryVertex.pt, reco::LeafCandidate.pt(), l1t::TkJetWord.pt(), tmtt::L1track3D.pt(), L1Analysis::L1AnalysisRecoMuonDataFormat.pt, l1t::VertexWord.pt(), PtHatRapReweightUserHook.pt, l1ct::tdr_regionizer::Buffer< T >.pt(), Run3ScoutingMuon.pt(), L1NNCaloTauProducer::SimpleHGCluster.pt, l1t::TkTripletWord.pt(), CosmicRateAnalyzer.pt, MuonGmtPair.pt(), pixelTrack::QualityCutsT< TrackerTraits, pixelTopology::isPhase1Topology< TrackerTraits > >.pt, L1TPhase2CorrelatorOffline::McVars.pt, RawParticle.pt(), pat::MET::Vector2.pt(), l1t::EMTFTrack.pt, L1TPhase2CorrelatorOffline::RecoVars.pt, tmtt::L1fittedTrack.pt(), reco::TrackBase.pt(), L1NNCaloTauEmulator::SimpleHGCluster.pt, pat::PackedGenParticle.pt(), p2eg::SimpleCaloHit.pt(), L1CaloJetProducer::simpleL1obj.pt(), L1NNCaloTauEmulator::InputHGCluster.pt, L1EGCrystalClusterEmulatorProducer::SimpleCaloHit.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, and Electron.Electron.validCandidateP4Kind().

Referenced by ntupleDataFormat.Track.ptPull().

411  def ptErr(self):
412  return self.p4Error(self.candidateP4Kind())*self.pt()/self.p() if self.validCandidateP4Kind() else None
413 
414 

◆ puChargedHadronIsoR()

def Electron.Electron.puChargedHadronIsoR (   self,
  R = 0.4 
)

Definition at line 341 of file Electron.py.

References PhysicsObject.PhysicsObject.physObj.

Referenced by Lepton.Lepton.absIsoR(), Muon.Muon.absIsoWithFSR(), and Electron.Electron.absIsoWithFSR().

341  def puChargedHadronIsoR(self,R=0.4):
342  if R == 0.3: return self.physObj.pfIsolationVariables().sumPUPt
343  elif R == 0.4: return self.physObj.puChargedHadronIso()
344  raise RuntimeError("Electron chargedHadronIso missing for R=%s" % R)
345 
346 

◆ tightId()

def Electron.Electron.tightId (   self)

Definition at line 177 of file Electron.py.

References Electron.Electron.tightIdResult.

177  def tightId( self ):
178  return self.tightIdResult
179 

◆ validCandidateP4Kind()

def Electron.Electron.validCandidateP4Kind (   self)

Definition at line 407 of file Electron.py.

References PhysicsObject.PhysicsObject.physObj.

Referenced by Electron.Electron.ptErr().

407  def validCandidateP4Kind(self):
408  raw = self.physObj.candidateP4Kind()
409  return raw in (0,1,2)
410 

Member Data Documentation

◆ _mvaNonTrigV0

Electron.Electron._mvaNonTrigV0
private

Definition at line 19 of file Electron.py.

Referenced by Electron.Electron.mvaNonTrigV0().

◆ _mvaRun2

Electron.Electron._mvaRun2
private

Definition at line 22 of file Electron.py.

Referenced by Electron.Electron.mvaRun2().

◆ _mvaTrigNoIPV0

Electron.Electron._mvaTrigNoIPV0
private

Definition at line 21 of file Electron.py.

Referenced by Electron.Electron.mvaTrigNoIPV0().

◆ _mvaTrigV0

Electron.Electron._mvaTrigV0
private

Definition at line 20 of file Electron.py.

Referenced by Electron.Electron.mvaTrigV0().

◆ associatedVertex

◆ rho

◆ tightIdResult

Electron.Electron.tightIdResult

Definition at line 16 of file Electron.py.

Referenced by Electron.Electron.tightId().