CMS 3D CMS Logo

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

Public Member Functions

def absEffAreaIso
 
def chargedAllIsoR
 
def chargedHadronIsoR
 
def dxy
 
def dz
 
def looseId
 
def muonID
 
def mvaId
 
def neutralHadronIsoR
 
def photonIsoR
 
def puChargedHadronIsoR
 
def tightId
 

Detailed Description

Definition at line 3 of file Muon.py.

Member Function Documentation

def Muon.Muon.absEffAreaIso (   self,
  rho,
  effectiveAreas 
)

Definition at line 42 of file Muon.py.

References Lepton.Lepton.absIsoFromEA(), DBlmapWriter::_LMapRowHBEF.eta, res::HelperElectron.eta(), res::HelperMuon.eta(), res::HelperJet.eta(), RecoObj.eta, muonisolation::NominalEfficiencyThresholds::ThresholdLocation.eta, MSLayersKeeperX0AtEta.eta(), HcalCellType::HcalCell.eta, res::HelperMET.eta(), SimG4HcalHitCluster.eta(), Raddam_ch.eta, jetData.eta, SuperClusterHelper.eta(), Residual1DHit.eta, CaloHit.eta(), DDHCalTestBeamAlgo.eta, DDHCalTBZposAlgo.eta, HcalChannelId.eta, MatchStruct.eta, PtEtaPhiMass.eta(), BenchmarkTreeEntry.eta, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.eta, learn_.eta, ImpactPoint.eta, reco::isodeposit::Direction.eta(), L2TauPixelTrackMatch::TinyTrack.eta, EnergyResolutionVsLumi::DegradationAtEta.eta, TrackerValidationVariables::AVHitStruct.eta, egHLT::BinData.eta, ShallowClustersProducer::NearDigis.eta(), LMapLoader::_LMapRowHBEF.eta, ElectronMVAEstimator.eta, LMapRow.eta, DTMuonLocalAlignment.eta, HcalTestHistoClass::Hit.eta, HcalFlexiHardcodeGeometryLoader::HECellParameters.eta, PatTrackAnalyzer::Plots.eta, ZMuMuIsolationAnalyzer.eta, PHcalTB04Info.eta(), BeamProfileVtxGenerator.eta(), MaterialBudgetCastorHistos.eta, lhef::JetClustering::Jet.eta(), GloballyPositioned< float >.eta(), GloballyPositioned< align::Scalar >.eta(), GloballyPositioned< T >.eta(), RotationType.eta(), QcdLowPtDQM::Pixel.eta(), PHcalTB06Info::Hit.eta, IdealZPrism.eta(), StripCPEgeometric::WrappedCluster.eta(), IdealObliquePrism.eta(), jpt::Map.eta(), OnePiRange< T >.eta(), Geom::OnePiRange< T >.eta(), PGlobalSimHit::CalHit.eta, MaterialBudget.eta, HLTJetsCleanedFromLeadingLeptons< JetType >::EtaPhiE.eta(), L1MuGMTEtaLUT.eta(), trigger::TriggerObject.eta(), FWPFCandidateDetailView.eta(), TrackerValidationVariables::AVTrackStruct.eta, JetCalibrationParameterSetTauJet.eta(), MaterialBudgetForward.eta, XMLHTRZeroSuppressionLoader::_datasetDBConfig.eta, PFECALSuperClusterAlgo::CalibratedPFCluster.eta(), reco::GhostTrackPrediction.eta(), HcalTB02HistoClass.eta(), reco::PattRecoPeak< Real >.eta(), MaterialBudgetHcalHistos.eta, HcalFlexiHardcodeGeometryLoader::HFCellParameters.eta, IsolatedPixelTrackCandidateProducer::seedAtEC.eta, reco::PattRecoPeak< double >.eta(), reco::PattRecoPeak< float >.eta(), PattRecoPeak< Real >.eta(), SoftElectronMVAEstimator.eta, PGlobalSimHit::FwdHit.eta, reco::CaloMuon.eta(), PHcalTB06Info.eta(), PdtPdgMini.eta, HTrackVariables.eta(), SimpleL1MuGMTCand.eta(), HLTMonPhotonSource.eta, CSCSP_SPblock.eta(), MuScleFitMuon.eta(), EleRelPoint.eta(), reco::CastorCell.eta(), XMLProcessor::_LMapRowHBEF.eta, ValidationMisalignedTracker.eta, cms::MinBias.eta, PhotonFix.eta(), L1MuDTEtaPattern.eta(), LMapDetId.eta, PatPhotonSimpleAnalyzer::struct_recPhoton.eta, PGlobalSimHit::BrlHit.eta, PhotonIDSimpleAnalyzer::struct_recPhoton.eta, reco::IsoDeposit.eta(), reco::CastorEgamma.eta(), reco::CastorJet.eta(), QcdLowPtDQM::Tracklet.eta(), Point3DBase< T, Frame >.eta(), Vector3DBase< double, LocalTag >.eta(), PV3DBase< float, VectorTag, MeasurementTag >.eta(), PV3DBase< T, PointTag, FrameTag >.eta(), Point3DBase< U, GlobalTag >.eta(), PV3DBase< float, VectorTag, LocalTag >.eta(), PV3DBase< float, PointTag, LocalTag >.eta(), PV3DBase< float, PointTag, MeasurementTag >.eta(), PV3DBase< Scalar, VectorTag, GlobalTag >.eta(), PV3DBase< T, PointTag, GlobalTag >.eta(), PV3DBase< float, VectorTag, GlobalTag >.eta(), PV3DBase< Scalar, PointTag, GlobalTag >.eta(), PV3DBase< align::Scalar, PointTag, GlobalTag >.eta(), PV3DBase< long double, PointTag, GlobalTag >.eta(), Point3DBase< U, LocalTag >.eta(), Point3DBase< U, FrameTag >.eta(), Vector3DBase< U, FrameTag >.eta(), PV3DBase< T, PVType, FrameType >.eta(), PV3DBase< float, PointTag, GlobalTag >.eta(), Vector3DBase< U, LocalTag >.eta(), Vector3DBase< T, FrameTag >.eta(), Vector3DBase< T, Frame >.eta(), PV3DBase< T, VectorTag, FrameTag >.eta(), Vector3DBase< U, Frame >.eta(), Vector3DBase< U, GlobalTag >.eta(), Point3DBase< U, Frame >.eta(), L1MuDTEtaProcessor.eta(), MuonDTLocalMillepedeAlgorithm.eta, L1MuDTTrack.eta(), HcalTB02Analysis.eta, L1TDEMON.eta, EgammaTowerIsolationNew< NC >.eta, cms::Analyzer_minbias.eta, MuonGmtPair.eta(), L1TdeGCT.eta, reco::Particle.eta(), reco::PreId.eta(), reco::CastorCluster.eta(), Lepton.eta, egHLT::OffPho.eta(), reco::Candidate.eta(), JetPartonNamespace::JetPartonCalibrationParameterSet.eta(), TrackingParticle.eta(), L1GctInternJetData.eta(), egHLT::OffEle.eta(), reco::LeafRefCandidateT< T >.eta(), LeafRefCandidateT< T >.eta(), EcalTestPulseAnalyzer.eta, pat::PackedGenParticle.eta(), EcalABAnalyzer.eta, MuonGeometryArrange::MGACollection.eta, Basic3DVector< long double >.eta(), EcalPerEvtLaserAnalyzer.eta, pat::PackedCandidate.eta(), reco::IsoDeposit::const_iterator.eta(), Basic3DVector< T >.eta(), Basic3DVector< float > pos GlobalPoint.eta(), Basic3DVector< Scalar >.eta(), Basic3DVector< double >.eta(), GoodSeedProducer.eta, Basic3DVector< float >.eta(), Basic3DVector< align::Scalar >.eta(), Basic3DVector< float > mom GlobalVector.eta(), Basic3DVector< U >.eta(), reco::CaloCluster.eta(), EcalLaserAnalyzer.eta, CandidateWithRef< Ref >.eta(), reco::LeafCandidate.eta(), RawParticle.eta(), EcalLaserAnalyzer2.eta, SiPixelErrorEstimation.eta, HLTEgamma::OpenHLTPhoton.eta, reco::TrackBase.eta(), HLTEgamma::OpenHLTElectron.eta, EcalSelectiveReadoutValidation::energiesEb_t.eta, EcalSelectiveReadoutValidation::energiesEe_t.eta, SiPixelTrackingRecHitsValid.eta, PMuonSimHit::Trk.eta, and PTrackerSimHit::Trk.eta.

Referenced by Lepton.Lepton.relEffAreaIso().

42 
43  def absEffAreaIso(self,rho,effectiveAreas):
44  return self.absIsoFromEA(rho,self.eta(),effectiveAreas.muon)
45 
46 
def absEffAreaIso
Definition: Muon.py:42
def Muon.Muon.chargedAllIsoR (   self,
  R = 0.4 
)

Definition at line 81 of file Muon.py.

81 
82  def chargedAllIsoR(self,R=0.4):
83  if R == 0.3: return self.physObj.pfIsolationR03().sumChargedParticlePt
84  elif R == 0.4: return self.physObj.pfIsolationR04().sumChargedParticlePt
85  raise RuntimeError, "Muon chargedAllIso missing for R=%s" % R
def chargedAllIsoR
Definition: Muon.py:81
def Muon.Muon.chargedHadronIsoR (   self,
  R = 0.4 
)

Definition at line 66 of file Muon.py.

66 
67  def chargedHadronIsoR(self,R=0.4):
68  if R == 0.3: return self.physObj.pfIsolationR03().sumChargedHadronPt
69  elif R == 0.4: return self.physObj.pfIsolationR04().sumChargedHadronPt
70  raise RuntimeError, "Muon chargedHadronIso missing for R=%s" % R
def chargedHadronIsoR
Definition: Muon.py:66
def Muon.Muon.dxy (   self,
  vertex = None 
)
either pass the vertex, or set associatedVertex before calling the function.
note: the function does not work with standalone muons as innerTrack
is not available.

Definition at line 47 of file Muon.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), reco::CaloMuon.innerTrack(), reco::Muon.innerTrack(), and pat::Muon.innerTrack().

Referenced by HTauTauElectron.HTauTauElectron.__str__().

47 
48  def dxy(self, vertex=None):
49  '''either pass the vertex, or set associatedVertex before calling the function.
50  note: the function does not work with standalone muons as innerTrack
51  is not available.
52  '''
53  if vertex is None:
54  vertex = self.associatedVertex
55  return self.innerTrack().dxy( vertex.position() )
56 
def dxy
Definition: Muon.py:47
def Muon.Muon.dz (   self,
  vertex = None 
)
either pass the vertex, or set associatedVertex before calling the function.
note: the function does not work with standalone muons as innerTrack
is not available.

Definition at line 57 of file Muon.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), reco::CaloMuon.innerTrack(), reco::Muon.innerTrack(), and pat::Muon.innerTrack().

Referenced by HTauTauElectron.HTauTauElectron.__str__(), and HTauTauElectron.HTauTauElectron.looseIdForEleTau().

57 
58  def dz(self, vertex=None):
59  '''either pass the vertex, or set associatedVertex before calling the function.
60  note: the function does not work with standalone muons as innerTrack
61  is not available.
62  '''
63  if vertex is None:
64  vertex = self.associatedVertex
65  return self.innerTrack().dz( vertex.position() )
def dz
Definition: Muon.py:57
def Muon.Muon.looseId (   self)
Loose ID as recommended by mu POG.

Definition at line 5 of file Muon.py.

Referenced by Muon.Muon.muonID().

5 
6  def looseId( self ):
7  '''Loose ID as recommended by mu POG.'''
8  return self.physObj.isLooseMuon()
def looseId
Definition: Muon.py:5
def Muon.Muon.muonID (   self,
  name,
  vertex = None 
)

Definition at line 13 of file Muon.py.

References reco::MuonTrackLinks.globalTrack(), reco::Muon.globalTrack(), pat::Muon.globalTrack(), reco::CaloMuon.innerTrack(), reco::Muon.innerTrack(), pat::Muon.innerTrack(), reco::ShallowClonePtrCandidate.isGlobalMuon(), reco::ShallowCloneCandidate.isGlobalMuon(), reco::Muon.isGlobalMuon(), reco::LeafRefCandidateT< T >.isGlobalMuon(), LeafRefCandidateT< T >.isGlobalMuon(), reco::Candidate.isGlobalMuon(), pat::PackedGenParticle.isGlobalMuon(), CandidateWithRef< Ref >.isGlobalMuon(), reco::LeafCandidate.isGlobalMuon(), pat::PackedCandidate.isGlobalMuon(), Muon.Muon.looseId(), and reco::Muon.numberOfMatchedStations().

Referenced by Muon.Muon.tightId().

13 
14  def muonID(self, name, vertex=None):
15  if name == "" or name is None:
16  return True
17  if name.startswith("POG_"):
18  if name == "POG_ID_Loose": return self.physObj.isLooseMuon()
19  if vertex is None:
20  vertex = getattr(self, 'associatedVertex', None)
21  if name == "POG_ID_Tight": return self.physObj.isTightMuon(vertex)
22  if name == "POG_ID_HighPt": return self.physObj.isHighPtMuon(vertex)
23  if name == "POG_ID_Soft": return self.physObj.isSoftMuon(vertex)
24  if name == "POG_ID_TightNoVtx": return self.looseId() and \
25  self.isGlobalMuon() and \
26  self.globalTrack().normalizedChi2() < 10 and \
27  self.globalTrack().hitPattern().numberOfValidMuonHits() > 0 and \
28  self.numberOfMatchedStations()>1 and \
29  self.innerTrack().hitPattern().numberOfValidPixelHits()>0 and \
30  self.innerTrack().hitPattern().trackerLayersWithMeasurement() > 5
31  if name == "POG_ID_Medium":
32  if not self.looseId(): return False
33  goodGlb = self.physObj.isGlobalMuon() and self.physObj.globalTrack().normalizedChi2() < 3 and self.physObj.combinedQuality().chi2LocalPosition < 12 and self.physObj.combinedQuality().trkKink < 20;
34  return self.physObj.innerTrack().validFraction() >= 0.8 and self.physObj.segmentCompatibility() >= (0.303 if goodGlb else 0.451)
35  return self.physObj.muonID(name)
def looseId
Definition: Muon.py:5
def muonID
Definition: Muon.py:13
def Muon.Muon.mvaId (   self)
For a transparent treatment of electrons and muons. Returns -99

Definition at line 36 of file Muon.py.

36 
37  def mvaId(self):
38  '''For a transparent treatment of electrons and muons. Returns -99'''
39  return -99
40 
41 
def mvaId
Definition: Muon.py:36
def Muon.Muon.neutralHadronIsoR (   self,
  R = 0.4 
)

Definition at line 71 of file Muon.py.

71 
72  def neutralHadronIsoR(self,R=0.4):
73  if R == 0.3: return self.physObj.pfIsolationR03().sumNeutralHadronEt
74  elif R == 0.4: return self.physObj.pfIsolationR04().sumNeutralHadronEt
75  raise RuntimeError, "Muon neutralHadronIso missing for R=%s" % R
def neutralHadronIsoR
Definition: Muon.py:71
def Muon.Muon.photonIsoR (   self,
  R = 0.4 
)

Definition at line 76 of file Muon.py.

76 
77  def photonIsoR(self,R=0.4):
78  if R == 0.3: return self.physObj.pfIsolationR03().sumPhotonEt
79  elif R == 0.4: return self.physObj.pfIsolationR04().sumPhotonEt
80  raise RuntimeError, "Muon photonIso missing for R=%s" % R
def photonIsoR
Definition: Muon.py:76
def Muon.Muon.puChargedHadronIsoR (   self,
  R = 0.4 
)

Definition at line 86 of file Muon.py.

86 
87  def puChargedHadronIsoR(self,R=0.4):
88  if R == 0.3: return self.physObj.pfIsolationR03().sumPUPt
89  elif R == 0.4: return self.physObj.pfIsolationR04().sumPUPt
90  raise RuntimeError, "Muon chargedHadronIso missing for R=%s" % R
91 
92 
93 
94 
def puChargedHadronIsoR
Definition: Muon.py:86
def Muon.Muon.tightId (   self)
Tight ID as recommended by mu POG.

Definition at line 9 of file Muon.py.

References Muon.Muon.muonID(), and pat::Muon.muonID().

9 
10  def tightId( self ):
11  '''Tight ID as recommended by mu POG.'''
12  return self.muonID("POG_ID_Tight")
def tightId
Definition: Muon.py:9
def muonID
Definition: Muon.py:13