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 29 of file Lepton.py.

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

Referenced by Lepton.Lepton.relIso().

29 
30  def absIso(self, dBetaFactor=0, allCharged=0):
31  if dBetaFactor>0 and self.puChargedHadronIso()<0:
32  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')
33  neutralIso = self.neutralHadronIso()+self.photonIso()
34  #Recover FSR
35  if hasattr(self,'fsrPhotons'):
36  for gamma in self.fsrPhotons:
37  neutralIso=neutralIso-gamma.pt()
38  corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIso()
39  charged = self.chargedHadronIso()
40  if allCharged:
41  charged = self.chargedAllIso()
42  return charged + max(corNeutralIso,0)
def absIso
Definition: Lepton.py:29
def Lepton.Lepton.absIsoFromEA (   self,
  area = "04" 
)
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 Photon.Photon.chargedHadronIso(), pat::Lepton< LeptonType >.chargedHadronIso(), pat::Photon.chargedHadronIso(), pat::Lepton< reco::BaseTau >.chargedHadronIso(), pat::Lepton< reco::GsfElectron >.chargedHadronIso(), pat::Lepton< reco::Muon >.chargedHadronIso(), Lepton< LeptonType >.chargedHadronIso(), reco::Photon::PflowIsolationVariables.chargedHadronIso, reco::Photon.chargedHadronIso(), bookConverter.max, Photon.Photon.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), pat::Photon.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(), pat::Lepton< reco::Muon >.photonIso(), Lepton< LeptonType >.photonIso(), pat::Lepton< LeptonType >.photonIso(), pat::Photon.photonIso(), pat::Lepton< reco::BaseTau >.photonIso(), pat::Lepton< reco::GsfElectron >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, reco::Photon.photonIso(), Electron.Electron.rho, BinomialProbHelper.rho(), CalorimeterProperties.rho(), PreshowerProperties.rho(), ECALProperties.rho(), TauValidation.rho, TangentCircle.rho(), TangentHelix.rho(), HCALProperties.rho(), MaterialEffectsSimulator.rho(), QcdLowPtDQM::Pixel.rho(), FastCircle.rho(), reco::GhostTrackPrediction.rho(), StoredPileupJetIdentifier.rho(), fastjet::BackgroundEstimator.rho(), reco::CastorCell.rho(), CylindricalState.rho(), reco::CastorJet.rho(), reco::CastorEgamma.rho(), reco::CastorTower.rho(), reco::CastorCluster.rho(), GeometricDet.rho(), AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

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

14 
15  def absIsoFromEA(self,area = "04"):
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=max(photonIso-gamma.pt(),0.0)
25 
26  offset = self.rho*getattr(self,"EffectiveArea"+area)
27  return self.chargedHadronIso()+max(0.,photonIso+self.neutralHadronIso()-offset)
28 
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 51 of file Lepton.py.

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

51 
52  def lostInner(self):
53  if hasattr(self.innerTrack(),"trackerExpectedHitsInner") :
return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
def lostInner
Definition: Lepton.py:51
def Lepton.Lepton.relEffAreaIso (   self,
  rho 
)
MIKE, missing doc

Definition at line 47 of file Lepton.py.

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

47 
48  def relEffAreaIso(self,rho):
49  '''MIKE, missing doc'''
50  return self.absEffAreaIso(rho)/self.pt()
def relEffAreaIso
Definition: Lepton.py:47
def Lepton.Lepton.relIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)

Definition at line 43 of file Lepton.py.

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

43 
44  def relIso(self,dBetaFactor=0, allCharged=0):
45  rel = self.absIso(dBetaFactor, allCharged)/self.pt()
46  return rel
def relIso
Definition: Lepton.py:43
def absIso
Definition: Lepton.py:29
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