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 absIsoFromEA
 
def absIsoR
 
def ip3D
 
def lostInner
 
def relIso
 
def relIsoFromEA
 
def relIsoR
 
def sip3D
 

Detailed Description

Definition at line 4 of file Lepton.py.

Member Function Documentation

def Lepton.Lepton.absIsoFromEA (   self,
  area = '04' 
)
Calculate Isolation using the effective area approach.

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(), pat::Lepton< LeptonType >.photonIso(), Lepton< LeptonType >.photonIso(), pat::Photon.photonIso(), pat::Lepton< reco::BaseTau >.photonIso(), pat::Lepton< reco::GsfElectron >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, reco::Photon.photonIso(), Photon.Photon.rho, 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(), fastjet::BackgroundEstimator.rho(), StoredPileupJetIdentifier.rho(), reco::CastorCell.rho(), CylindricalState.rho(), reco::CastorEgamma.rho(), reco::CastorJet.rho(), reco::CastorTower.rho(), reco::CastorCluster.rho(), GeometricDet.rho(), AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Lepton.Lepton.relIsoFromEA().

14 
15  def absIsoFromEA(self, area='04'):
16  '''Calculate Isolation using the effective area approach.'''
17  photonIso = self.photonIso()
18  offset = self.rho*getattr(self,"EffectiveArea"+area)
19  return self.chargedHadronIso()+max(0.,photonIso+self.neutralHadronIso()-offset)
def absIsoFromEA
Definition: Lepton.py:14
def Lepton.Lepton.absIsoR (   self,
  R = 0.4,
  dBetaFactor = 0,
  allCharged = False 
)
Isolation in given cone with optional delta-beta subtraction.

Definition at line 28 of file Lepton.py.

References Muon.Muon.chargedAllIsoR(), Electron.Electron.chargedAllIsoR(), Muon.Muon.chargedHadronIsoR(), Electron.Electron.chargedHadronIsoR(), bookConverter.max, Muon.Muon.neutralHadronIsoR(), Electron.Electron.neutralHadronIsoR(), Muon.Muon.photonIsoR(), Electron.Electron.photonIsoR(), Muon.Muon.puChargedHadronIsoR(), and Electron.Electron.puChargedHadronIsoR().

Referenced by Lepton.Lepton.relIso(), and Lepton.Lepton.relIsoR().

28 
29  def absIsoR(self, R=0.4, dBetaFactor=0, allCharged=False):
30  '''Isolation in given cone with optional delta-beta subtraction.'''
31  if dBetaFactor>0 and self.puChargedHadronIsoR(R)<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.neutralHadronIsoR(R) + self.photonIsoR(R)
34  corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIsoR(R)
35  charged = self.chargedHadronIsoR(R)
36  if allCharged:
37  charged = self.chargedAllIsoR(R)
38  return charged + max(corNeutralIso, 0.)
def absIsoR
Definition: Lepton.py:28
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 42 of file Lepton.py.

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

42 
43  def lostInner(self):
44  if hasattr(self.innerTrack(),"trackerExpectedHitsInner") :
return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
def lostInner
Definition: Lepton.py:42
def Lepton.Lepton.relIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)
Relative isolation with default cone size of 0.4.

Definition at line 23 of file Lepton.py.

References Lepton.Lepton.absIsoR(), 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(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingMuon.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ScoutingPFJet.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HTrackVariables.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), PhotonPair.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackStruct::TrackParameterStruct.pt, reco::Particle.pt(), reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), reco::PFCluster.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), pat::PackedGenParticle.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

23 
24  def relIso(self, dBetaFactor=0, allCharged=0):
25  '''Relative isolation with default cone size of 0.4.'''
26  rel = self.absIsoR(dBetaFactor, allCharged)/self.pt()
27  return rel
def relIso
Definition: Lepton.py:23
def absIsoR
Definition: Lepton.py:28
def Lepton.Lepton.relIsoFromEA (   self,
  area = '04' 
)

Definition at line 20 of file Lepton.py.

References Lepton.Lepton.absIsoFromEA(), 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(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingMuon.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ScoutingPFJet.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HTrackVariables.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), PhotonPair.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackStruct::TrackParameterStruct.pt, reco::Particle.pt(), reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), reco::PFCluster.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), pat::PackedGenParticle.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

20 
21  def relIsoFromEA(self, area='04'):
22  return self.absIsoFromEA(area)/self.pt()
def relIsoFromEA
Definition: Lepton.py:20
def absIsoFromEA
Definition: Lepton.py:14
def Lepton.Lepton.relIsoR (   self,
  R = 0.4,
  dBetaFactor = 0,
  allCharged = False 
)

Definition at line 39 of file Lepton.py.

References Lepton.Lepton.absIsoR(), 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(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingMuon.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ScoutingPFJet.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HTrackVariables.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), PhotonPair.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackStruct::TrackParameterStruct.pt, reco::Particle.pt(), reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), reco::PFCluster.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), pat::PackedGenParticle.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

39 
40  def relIsoR(self, R=0.4, dBetaFactor=0, allCharged=False):
41  return self.absIsoR(R, dBetaFactor, allCharged)/self.pt()
def relIsoR
Definition: Lepton.py:39
def absIsoR
Definition: Lepton.py:28
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