CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
Lepton.Lepton Class Reference
Inheritance diagram for Lepton.Lepton:

Public Member Functions

def absIso
 
def absIsoFromEA
 
def ip3D
 
def lostInner
 
def relEffAreaIso
 
def relIso
 
def sip3D
 

Detailed Description

Definition at line 4 of file Lepton.py.

Member Function Documentation

def Lepton.Lepton.absIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)

Definition at line 44 of file Lepton.py.

References Muon.Muon.chargedAllIso(), Electron.Electron.chargedAllIso(), Photon.Photon.chargedHadronIso(), pat::Photon.chargedHadronIso(), pat::Lepton< reco::Muon >.chargedHadronIso(), Lepton< LeptonType >.chargedHadronIso(), pat::Lepton< LeptonType >.chargedHadronIso(), pat::Lepton< reco::BaseTau >.chargedHadronIso(), pat::Lepton< reco::GsfElectron >.chargedHadronIso(), reco::Photon::PflowIsolationVariables.chargedHadronIso, reco::Photon.chargedHadronIso(), bookConverter.max, Photon.Photon.neutralHadronIso(), pat::Photon.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), pat::Lepton< reco::GsfElectron >.neutralHadronIso(), pat::Lepton< reco::BaseTau >.neutralHadronIso(), pat::Lepton< reco::Muon >.neutralHadronIso(), Lepton< LeptonType >.neutralHadronIso(), reco::Photon::PflowIsolationVariables.neutralHadronIso, reco::Photon.neutralHadronIso(), Photon.Photon.photonIso(), pat::Photon.photonIso(), pat::Lepton< reco::Muon >.photonIso(), pat::Lepton< reco::GsfElectron >.photonIso(), pat::Lepton< LeptonType >.photonIso(), Lepton< LeptonType >.photonIso(), pat::Lepton< reco::BaseTau >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, reco::Photon.photonIso(), pat::Photon.puChargedHadronIso(), Lepton< LeptonType >.puChargedHadronIso(), pat::Lepton< reco::BaseTau >.puChargedHadronIso(), pat::Lepton< reco::GsfElectron >.puChargedHadronIso(), pat::Lepton< LeptonType >.puChargedHadronIso(), and pat::Lepton< reco::Muon >.puChargedHadronIso().

Referenced by Lepton.Lepton.relIso().

44 
45  def absIso(self, dBetaFactor=0, allCharged=0):
46  if dBetaFactor>0 and self.puChargedHadronIso()<0:
47  raise ValueError('If you want to use dbeta corrections, you must make sure that the pu charged hadron iso is available. This should never happen')
48  neutralIso = self.neutralHadronIso()+self.photonIso()
49  #Recover FSR
50  if hasattr(self,'fsrPhotons'):
51  for gamma in self.fsrPhotons:
52  neutralIso=neutralIso-gamma.pt()
53  corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIso()
54  charged = self.chargedHadronIso()
55  if allCharged:
56  charged = self.chargedAllIso()
57  return charged + max(corNeutralIso,0)
def absIso
Definition: Lepton.py:44
def Lepton.Lepton.absIsoFromEA (   self,
  rho,
  eta,
  effectiveArea1 = None,
  effectiveArea2 = None 
)
Calculate Isolation using the effective area approach. If fsrPhotons is set
the list of photons is subtracted from the isolation cone. It works with one or
two effective Areas in case one needs to do photon and neutral hadron separately

Definition at line 14 of file Lepton.py.

References funct.abs(), Photon.Photon.chargedHadronIso(), pat::Photon.chargedHadronIso(), pat::Lepton< reco::BaseTau >.chargedHadronIso(), pat::Lepton< reco::GsfElectron >.chargedHadronIso(), pat::Lepton< reco::Muon >.chargedHadronIso(), Lepton< LeptonType >.chargedHadronIso(), pat::Lepton< LeptonType >.chargedHadronIso(), reco::Photon::PflowIsolationVariables.chargedHadronIso, reco::Photon.chargedHadronIso(), bookConverter.max, Photon.Photon.neutralHadronIso(), pat::Photon.neutralHadronIso(), pat::Lepton< reco::GsfElectron >.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), Lepton< LeptonType >.neutralHadronIso(), pat::Lepton< reco::BaseTau >.neutralHadronIso(), pat::Lepton< reco::Muon >.neutralHadronIso(), reco::Photon::PflowIsolationVariables.neutralHadronIso, reco::Photon.neutralHadronIso(), Photon.Photon.photonIso(), pat::Photon.photonIso(), pat::Lepton< reco::Muon >.photonIso(), pat::Lepton< LeptonType >.photonIso(), Lepton< LeptonType >.photonIso(), pat::Lepton< reco::BaseTau >.photonIso(), pat::Lepton< reco::GsfElectron >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, and reco::Photon.photonIso().

Referenced by Muon.Muon.absEffAreaIso(), and Electron.Electron.absEffAreaIso().

14 
15  def absIsoFromEA(self,rho,eta,effectiveArea1 = None,effectiveArea2 = None):
16  '''
17  Calculate Isolation using the effective area approach. If fsrPhotons is set
18  the list of photons is subtracted from the isolation cone. It works with one or
19  two effective Areas in case one needs to do photon and neutral hadron separately
20  '''
21  photonIso = self.photonIso()
22  if hasattr(self,'fsrPhotons'):
23  for gamma in self.fsrPhotons:
24  photonIso=photonIso-gamma.pt()
25  ea1 = rho
26  ea2 = rho
27  if effectiveArea1 is not None:
28  for element in effectiveArea1:
29  if abs(eta)>= element['etaMin'] and \
30  abs(eta)< element['etaMax']:
31  ea1 = ea1 * element['area']
32  break
33  else:
34  return self.chargedHadronIso()+max(0.,photonIso+self.neutralHadronIso()-ea1)
35  if effectiveArea2 is not None:
36  for element in effectiveArea2:
37  if abs(eta)>= element['etaMin'] and \
38  abs(eta)< element['etaMax']:
39  ea2 = ea2 * element['area']
40  return self.chargedHadronIso()+max(0.,photonIso-ea1)+max(0.,self.neutralHadronIso()-ea2)
41  else:
42  return self.chargedHadronIso()+max(0.,photonIso+self.neutralHadronIso()-ea1)
43 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def absIsoFromEA
Definition: Lepton.py:14
def Lepton.Lepton.ip3D (   self)
3D impact parameter value.

Definition at line 5 of file Lepton.py.

References funct.abs(), pat::Electron.dB(), pat::Muon.dB(), pat::Electron.PV3D, and pat::Muon.PV3D.

5 
6  def ip3D(self):
7  '''3D impact parameter value.'''
8  return abs(self.dB(self.PV3D))
9 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def ip3D
Definition: Lepton.py:5
def Lepton.Lepton.lostInner (   self)

Definition at line 66 of file Lepton.py.

References reco::CaloMuon.innerTrack(), reco::Muon.innerTrack(), and pat::Muon.innerTrack().

66 
67  def lostInner(self):
68  if hasattr(self.innerTrack(),"trackerExpectedHitsInner") :
return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
def lostInner
Definition: Lepton.py:66
def Lepton.Lepton.relEffAreaIso (   self,
  rho 
)
MIKE, missing doc

Definition at line 62 of file Lepton.py.

References Muon.Muon.absEffAreaIso(), Electron.Electron.absEffAreaIso(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), reco::MuonMETCorrectionData.pt(), Residual1DHit.pt, MatchStruct.pt, PtEtaPhiMass.pt(), PtHatReweightUserHook.pt, ALILine.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ElectronMVAEstimator.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), lhef::JetClustering::Jet.pt(), ZMuMuIsolationAnalyzer.pt, PatTrackAnalyzer::Plots.pt, TrackerValidationVariables::AVTrackStruct.pt, reco::CaloMuon.pt(), SiStripLAProfileBooker.pt, PhysicsObjectsMonitor.pt, jpt::Map.pt(), trigger::TriggerObject.pt(), BSTrkParameters.pt(), SoftElectronMVAEstimator.pt, MuScleFitMuon.pt(), HTrackVariables.pt(), ValidationMisalignedTracker.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), TrajectoryStateClosestToPoint.pt(), MuonDTLocalMillepedeAlgorithm.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), reco::Particle.pt(), reco::ParticleState.pt(), TrackingParticle.pt(), pat::PackedGenParticle.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, pat::PackedCandidate.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::LeafCandidate.pt(), CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

62 
63  def relEffAreaIso(self,rho):
64  '''MIKE, missing doc'''
65  return self.absEffAreaIso(rho)/self.pt()
def relEffAreaIso
Definition: Lepton.py:62
def Lepton.Lepton.relIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)

Definition at line 58 of file Lepton.py.

References IsoTrack.IsoTrack.absIso(), Lepton.Lepton.absIso(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), reco::MuonMETCorrectionData.pt(), Residual1DHit.pt, MatchStruct.pt, PtEtaPhiMass.pt(), PtHatReweightUserHook.pt, ALILine.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ElectronMVAEstimator.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), lhef::JetClustering::Jet.pt(), ZMuMuIsolationAnalyzer.pt, PatTrackAnalyzer::Plots.pt, TrackerValidationVariables::AVTrackStruct.pt, reco::CaloMuon.pt(), SiStripLAProfileBooker.pt, PhysicsObjectsMonitor.pt, jpt::Map.pt(), trigger::TriggerObject.pt(), BSTrkParameters.pt(), SoftElectronMVAEstimator.pt, MuScleFitMuon.pt(), HTrackVariables.pt(), ValidationMisalignedTracker.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), TrajectoryStateClosestToPoint.pt(), MuonDTLocalMillepedeAlgorithm.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), reco::Particle.pt(), reco::ParticleState.pt(), TrackingParticle.pt(), pat::PackedGenParticle.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, pat::PackedCandidate.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::LeafCandidate.pt(), CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

58 
59  def relIso(self,dBetaFactor=0, allCharged=0):
60  rel = self.absIso(dBetaFactor, allCharged)/self.pt()
61  return rel
def relIso
Definition: Lepton.py:58
def absIso
Definition: Lepton.py:44
def Lepton.Lepton.sip3D (   self)
3D impact parameter significance.

Definition at line 10 of file Lepton.py.

References funct.abs(), pat::Electron.dB(), pat::Muon.dB(), pat::Electron.edB(), pat::Muon.edB(), pat::Electron.PV3D, and pat::Muon.PV3D.

10 
11  def sip3D(self):
12  '''3D impact parameter significance.'''
13  return abs(self.dB(self.PV3D) / self.edB(self.PV3D))
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def sip3D
Definition: Lepton.py:10