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 relEffAreaIso
 
def relIso
 
def relIsoAllChargedDB05
 
def sip3D
 

Detailed Description

Definition at line 3 of file Lepton.py.

Member Function Documentation

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

Definition at line 43 of file Lepton.py.

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

Referenced by Lepton.Lepton.relIso().

43 
44  def absIso(self,dBetaFactor = 0,allCharged=0):
45  if dBetaFactor>0 and self.puChargedHadronIso()<0:
46  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')
47  neutralIso = self.neutralHadronIso()+self.photonIso()
48  #Recover FSR
49  if hasattr(self,'fsrPhotons'):
50  for gamma in self.fsrPhotons:
51  neutralIso=neutralIso-gamma.pt()
52  corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIso();
53  charged = self.chargedHadronIso();
54  if allCharged:
55  charged = self.chargedAllIso();
56  return charged + max(corNeutralIso,0)
def absIso
Definition: Lepton.py:43
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 13 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::BaseTau >.neutralHadronIso(), Lepton< LeptonType >.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), pat::Lepton< reco::GsfElectron >.neutralHadronIso(), pat::Lepton< reco::Muon >.neutralHadronIso(), reco::Photon::PflowIsolationVariables.neutralHadronIso, reco::Photon.neutralHadronIso(), Photon.Photon.photonIso(), HTauTauElectron.HTauTauElectron.photonIso(), pat::Photon.photonIso(), Lepton< LeptonType >.photonIso(), pat::Lepton< reco::BaseTau >.photonIso(), pat::Lepton< reco::Muon >.photonIso(), pat::Lepton< reco::GsfElectron >.photonIso(), pat::Lepton< LeptonType >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, and reco::Photon.photonIso().

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

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

Definition at line 4 of file Lepton.py.

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

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

Definition at line 76 of file Lepton.py.

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

76 
77  def lostInner(self):
78  if hasattr(self.innerTrack(),"trackerExpectedHitsInner") :
return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
def lostInner
Definition: Lepton.py:76
def Lepton.Lepton.relEffAreaIso (   self,
  rho 
)
MIKE, missing doc

Definition at line 67 of file Lepton.py.

Referenced by Lepton.Lepton.relEffAreaIso().

67 
68  def relEffAreaIso(self,rho):
69  '''MIKE, missing doc'''
70  return 0
71 
def relEffAreaIso
Definition: Lepton.py:67
def Lepton.Lepton.relEffAreaIso (   self,
  rho 
)
MIKE, missing doc

Definition at line 72 of file Lepton.py.

References Muon.Muon.absEffAreaIso(), Electron.Electron.absEffAreaIso(), mypt.pt, res::HelperMuon.pt(), res::HelperElectron.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), reco::MuonMETCorrectionData.pt(), Residual1DHit.pt, MatchStruct.pt, PtHatReweightUserHook.pt, PtEtaPhiMass.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, SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), jpt::Map.pt(), trigger::TriggerObject.pt(), BSTrkParameters.pt(), SoftElectronMVAEstimator.pt, PhysicsObjectsMonitor.pt, MuScleFitMuon.pt(), HTrackVariables.pt(), PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HepLine3D.pt(), L1MuDTTrack.pt(), TrajectoryStateClosestToPoint.pt(), MuonDTLocalMillepedeAlgorithm.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, reco::Particle.pt(), MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackingParticle.pt(), reco::LeafRefCandidateT< T >.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), LeafRefCandidateT< T >.pt(), pat::PackedGenParticle.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, pat::PackedCandidate.pt(), reco::PFCluster.pt(), GoodSeedProducer.pt, pat::MET::UncorInfo.pt, CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), pat::MET::Vector2.pt(), reco::TrackBase.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, and Lepton.Lepton.relEffAreaIso().

72 
73  def relEffAreaIso(self,rho):
74  '''MIKE, missing doc'''
75  return self.absEffAreaIso(rho)/self.pt()
def relEffAreaIso
Definition: Lepton.py:67
def Lepton.Lepton.relIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)

Definition at line 57 of file Lepton.py.

References IsoTrack.IsoTrack.absIso(), Lepton.Lepton.absIso(), mypt.pt, res::HelperMuon.pt(), res::HelperElectron.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), reco::MuonMETCorrectionData.pt(), Residual1DHit.pt, PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.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, SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), jpt::Map.pt(), trigger::TriggerObject.pt(), BSTrkParameters.pt(), SoftElectronMVAEstimator.pt, PhysicsObjectsMonitor.pt, MuScleFitMuon.pt(), HTrackVariables.pt(), PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HepLine3D.pt(), L1MuDTTrack.pt(), TrajectoryStateClosestToPoint.pt(), MuonDTLocalMillepedeAlgorithm.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, reco::Particle.pt(), MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackingParticle.pt(), LeafRefCandidateT< T >.pt(), reco::LeafRefCandidateT< T >.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), pat::PackedGenParticle.pt(), PtHatRapReweightUserHook.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, pat::PackedCandidate.pt(), reco::PFCluster.pt(), GoodSeedProducer.pt, pat::MET::UncorInfo.pt, pat::MET::Vector2.pt(), CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), reco::TrackBase.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

Referenced by Lepton.Lepton.relIsoAllChargedDB05().

57 
58  def relIso(self,dBetaFactor=0, allCharged=0):
59  rel = self.absIso(dBetaFactor, allCharged)/self.pt();
60  return rel
61 
def relIso
Definition: Lepton.py:57
def absIso
Definition: Lepton.py:43
def Lepton.Lepton.relIsoAllChargedDB05 (   self)
Used in the H2TauTau analysis: rel iso, dbeta=0.5, using all charged particles.

Definition at line 62 of file Lepton.py.

References IsoTrack.IsoTrack.relIso(), and Lepton.Lepton.relIso().

62 
63  def relIsoAllChargedDB05(self):
64  '''Used in the H2TauTau analysis: rel iso, dbeta=0.5, using all charged particles.'''
65  return self.relIso( 0.5, 1 )
66 
def relIso
Definition: Lepton.py:57
def relIsoAllChargedDB05
Definition: Lepton.py:62
def Lepton.Lepton.sip3D (   self)
3D impact parameter significance.

Definition at line 9 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.

9 
10  def sip3D(self):
11  '''3D impact parameter significance.'''
12  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:9