CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

reco::Muon Class Reference

#include <DataFormats/MuonReco/interface/Muon.h>

Inheritance diagram for reco::Muon:
reco::RecoCandidate reco::LeafCandidate reco::Candidate pat::PATObject< reco::Muon > pat::Lepton< reco::Muon > pat::Muon

List of all members.

Public Types

enum  ArbitrationType {
  NoArbitration, SegmentArbitration, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned,
  RPCHitAndTrackArbitration
}
 

define arbitration schemes

More...
typedef std::map
< MuonTrackType,
reco::TrackRef
MuonTrackRefMap
enum  MuonTrackType {
  None, InnerTrack, OuterTrack, CombinedTrack,
  TPFMS, Picky, DYT
}
 

map for Global Muon refitters

More...
typedef std::pair< TrackRef,
Muon::MuonTrackType
MuonTrackTypePair

Public Member Functions

virtual const TrackbestTrack () const
 best track pointer
virtual TrackBaseRef bestTrackRef () const
 best track RefToBase
MuonEnergy calEnergy () const
 get energy deposition information
float caloCompatibility () const
Muonclone () const
 create a clone
virtual TrackRef combinedMuon () const
 reference to a stand-alone muon Track
MuonQuality combinedQuality () const
 get energy deposition information
float dDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float dDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float dX (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float dY (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
virtual TrackRef dytTrack () const
virtual TrackRef globalTrack () const
 reference to Track reconstructed in both tracked and muon detector
virtual TrackRef innerTrack () const
bool isAValidMuonTrack (const MuonTrackType &type) const
bool isCaloCompatibilityValid () const
bool isCaloMuon () const
bool isEnergyValid () const
bool isGlobalMuon () const
bool isIsolationValid () const
bool isMatchesValid () const
bool isMuon () const
const MuonIsolationisolationR03 () const
const MuonIsolationisolationR05 () const
bool isPFIsolationValid () const
bool isPFMuon () const
bool isQualityValid () const
bool isRPCMuon () const
bool isStandAloneMuon () const
bool isTimeValid () const
bool isTrackerMuon () const
std::vector< MuonChamberMatch > & matches ()
 get muon matching information
const std::vector
< MuonChamberMatch > & 
matches () const
 Muon (Charge, const LorentzVector &, const Point &=Point(0, 0, 0))
 constructor from values
 Muon ()
virtual TrackRef muonBestTrack () const
virtual MuonTrackType muonBestTrackType () const
TrackRef muonTrack (const MuonTrackType &) const
TrackRef muonTrackFromMap (const MuonTrackType &type) const
int numberOfChambers () const
int numberOfChambersNoRPC () const
 number of chambers not including RPC matches (MuonChamberMatches include RPC rolls)
int numberOfMatchedRPCLayers (ArbitrationType type=RPCHitAndTrackArbitration) const
int numberOfMatchedStations (ArbitrationType type=SegmentAndTrackArbitration) const
int numberOfMatches (ArbitrationType type=SegmentAndTrackArbitration) const
 get number of chambers with matched segments
int numberOfSegments (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
 get number of segments
virtual TrackRef outerTrack () const
 reference to Track reconstructed in the muon detector only
const MuonPFIsolationpfIsolationR03 () const
const MuonPFIsolationpfIsolationR04 () const
const MuonPFIsolationpfMeanDRIsoProfileR03 () const
const MuonPFIsolationpfMeanDRIsoProfileR04 () const
reco::Candidate::LorentzVector pfP4 () const
const MuonPFIsolationpfSumDRIsoProfileR03 () const
const MuonPFIsolationpfSumDRIsoProfileR04 () const
virtual TrackRef pickyTrack () const
float pullDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
float pullDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
float pullX (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
float pullY (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration, bool includeSegmentError=true) const
unsigned int RPClayerMask (ArbitrationType type=RPCHitAndTrackArbitration) const
float segmentDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentDxDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentDyDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentX (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentXErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentY (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float segmentYErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
virtual void setBestTrack (MuonTrackType muonType)
void setCalEnergy (const MuonEnergy &calEnergy)
 set energy deposition information
void setCaloCompatibility (float input)
virtual void setCombined (const TrackRef &t)
void setCombinedQuality (const MuonQuality &combinedQuality)
 set energy deposition information
virtual void setGlobalTrack (const TrackRef &t)
 set reference to Track
virtual void setInnerTrack (const TrackRef &t)
 set reference to Track
void setIsolation (const MuonIsolation &isoR03, const MuonIsolation &isoR05)
void setMatches (const std::vector< MuonChamberMatch > &matches)
 set muon matching information
void setMuonTrack (const MuonTrackType &, const TrackRef &)
virtual void setOuterTrack (const TrackRef &t)
 set reference to Track
void setPFIsolation (const std::string &label, const reco::MuonPFIsolation &deposit)
virtual void setPFP4 (const reco::Candidate::LorentzVector &p4_)
virtual void setStandAlone (const TrackRef &t)
void setTime (const MuonTime &time)
 set timing information
virtual void setTrack (const TrackRef &t)
virtual void setTunePBestTrack (MuonTrackType muonType)
void setType (unsigned int type)
virtual TrackRef standAloneMuon () const
 reference to a stand-alone muon Track
unsigned int stationGapMaskDistance (float distanceCut=10.) const
unsigned int stationGapMaskPull (float sigmaCut=3.) const
 same as above for given number of sigmas
unsigned int stationMask (ArbitrationType type=SegmentAndTrackArbitration) const
float t0 (int n=0)
MuonTime time () const
 get timing information
virtual TrackRef tpfmsTrack () const
virtual TrackRef track () const
 reference to a Track
float trackDist (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackDistErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackDxDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackDyDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackEdgeX (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackEdgeY (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackX (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackXErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackY (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
float trackYErr (int station, int muonSubdetId, ArbitrationType type=SegmentAndTrackArbitration) const
virtual TrackRef tunePMuonBestTrack () const
virtual MuonTrackType tunePMuonBestTrackType () const
unsigned int type () const

Static Public Attributes

static const unsigned int CaloMuon = 1<<4
static const unsigned int GlobalMuon = 1<<1
static const unsigned int PFMuon = 1<<5
static const unsigned int RPCMuon = 1<<6
static const unsigned int StandAloneMuon = 1<<3
static const unsigned int TrackerMuon = 1<<2

Private Member Functions

const std::vector< const
MuonChamberMatch * > 
chambers (int station, int muonSubdetId) const
 get vector of muon chambers for given station and detector
virtual bool overlap (const Candidate &) const
 check overlap with another candidate
std::pair< const
MuonChamberMatch *, const
MuonSegmentMatch * > 
pair (const std::vector< const MuonChamberMatch * > &, ArbitrationType type=SegmentAndTrackArbitration) const
 get pointers to best segment and corresponding chamber in vector of chambers

Private Attributes

MuonTrackType bestTrackType_
 reference to the Track chosen to assign the momentum value to the muon
MuonTrackType bestTunePTrackType_
 reference to the Track chosen to assign the momentum value to the muon by PF
MuonEnergy calEnergy_
 energy deposition
float caloCompatibility_
 muon hypothesis compatibility with observer calorimeter energy
MuonQuality combinedQuality_
 quality block
bool energyValid_
TrackRef globalTrack_
 reference to Track reconstructed in both tracked and muon detector
TrackRef innerTrack_
 reference to Track reconstructed in the tracker only
MuonIsolation isolationR03_
 Isolation information for two cones with dR=0.3 and dR=0.5.
MuonIsolation isolationR05_
bool isolationValid_
bool matchesValid_
std::vector< MuonChamberMatchmuMatches_
 Information on matching between tracks and segments.
TrackRef outerTrack_
 reference to Track reconstructed in the muon detector only
MuonPFIsolation pfIsolationR03_
 PF Isolation information for two cones with dR=0.3 and dR=0.4.
MuonPFIsolation pfIsolationR04_
bool pfIsolationValid_
MuonPFIsolation pfIsoMeanDRR03_
MuonPFIsolation pfIsoMeanDRR04_
MuonPFIsolation pfIsoSumDRR03_
MuonPFIsolation pfIsoSumDRR04_
reco::Candidate::LorentzVector pfP4_
bool qualityValid_
MuonTrackRefMap refittedTrackMap_
 reference to the Global Track refitted with dedicated TeV reconstructors
MuonTime time_
 timing
unsigned int type_
 muon type mask

Detailed Description

A reconstructed Muon. contains reference to three fits:

Author:
Luca Lista, Claudio Campagnari, Dmytro Kovalskyi, Jake Ribnik, Riccardo Bellan, Michalis Bachtis
Version:
Id:
Muon.h,v 1.77 2013/02/07 00:22:49 bachtis Exp

Definition at line 28 of file Muon.h.


Member Typedef Documentation

Definition at line 40 of file Muon.h.

Definition at line 41 of file Muon.h.


Member Enumeration Documentation

define arbitration schemes

Enumerator:
NoArbitration 
SegmentArbitration 
SegmentAndTrackArbitration 
SegmentAndTrackArbitrationCleaned 
RPCHitAndTrackArbitration 

Definition at line 179 of file Muon.h.

map for Global Muon refitters

Enumerator:
None 
InnerTrack 
OuterTrack 
CombinedTrack 
TPFMS 
Picky 
DYT 

Definition at line 39 of file Muon.h.


Constructor & Destructor Documentation

Muon::Muon ( )
Muon::Muon ( Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ) 
)

Member Function Documentation

virtual const Track* reco::Muon::bestTrack ( ) const [inline, virtual]

best track pointer

Reimplemented from reco::RecoCandidate.

Definition at line 62 of file Muon.h.

References bestTrackType_, edm::Ref< C, T, F >::get(), and muonTrack().

Referenced by muon::isHighPtMuon().

{return muonTrack(bestTrackType_).get();}
virtual TrackBaseRef reco::Muon::bestTrackRef ( ) const [inline, virtual]

best track RefToBase

Reimplemented from reco::RecoCandidate.

Definition at line 63 of file Muon.h.

References bestTrackType_, and muonTrack().

Referenced by SelectReplacementCandidates::getRawIDsAdvanced().

MuonEnergy reco::Muon::calEnergy ( ) const [inline]
float reco::Muon::caloCompatibility ( ) const [inline]

====================== MUON COMPATIBILITY BLOCK ===========================

Relative likelihood based on ECAL, HCAL, HO energy defined as L_muon/(L_muon+L_not_muon)

Definition at line 151 of file Muon.h.

References caloCompatibility_.

Referenced by muon::caloCompatibility(), TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::evaluateMuonVeto(), and CaloMuonMerger::produce().

{ return caloCompatibility_; }
const std::vector< const MuonChamberMatch * > Muon::chambers ( int  station,
int  muonSubdetId 
) const [private]

get vector of muon chambers for given station and detector

Definition at line 364 of file Muon.cc.

References muMatches_.

Referenced by dDxDz(), dDyDz(), dX(), dY(), pullDxDz(), pullDyDz(), pullX(), pullY(), segmentDxDz(), segmentDxDzErr(), segmentDyDz(), segmentDyDzErr(), segmentX(), segmentXErr(), segmentY(), segmentYErr(), trackDist(), trackDistErr(), trackDxDz(), trackDxDzErr(), trackDyDz(), trackDyDzErr(), trackEdgeX(), trackEdgeY(), trackX(), trackXErr(), trackY(), and trackYErr().

{
   std::vector<const MuonChamberMatch*> chambers;
   for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
         chamberMatch != muMatches_.end(); chamberMatch++)
      if(chamberMatch->station()==station && chamberMatch->detector()==muonSubdetId)
         chambers.push_back(&(*chamberMatch));
   return chambers;
}
Muon * Muon::clone ( void  ) const [virtual]

create a clone

Reimplemented from reco::RecoCandidate.

Reimplemented in pat::Muon, and pat::Lepton< reco::Muon >.

Definition at line 44 of file Muon.cc.

References Muon().

Referenced by MuonsFromRefitTracksProducer::cloneAndSwitchTrack().

                         {
  return new Muon( * this );
}
virtual TrackRef reco::Muon::combinedMuon ( ) const [inline, virtual]
MuonQuality reco::Muon::combinedQuality ( ) const [inline]

get energy deposition information

Definition at line 122 of file Muon.h.

References combinedQuality_.

Referenced by MuonIdProducer::fillGlbQuality(), MuonIdProducer::fillTrackerKink(), muon::isGoodMuon(), and setCombinedQuality().

{ return combinedQuality_; }
float Muon::dDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 430 of file Muon.cc.

References chambers(), and pair().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ;
}
float Muon::dDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 438 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ;
}
float Muon::dX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

get deltas between (best) segment and track If no chamber or no segment returns 999999

Definition at line 413 of file Muon.cc.

References chambers(), and pair().

Referenced by muon::isGoodMuon(), and muon::segmentCompatibility().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.first->x-chamberSegmentPair.second->x;
}
float Muon::dY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 421 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

Referenced by muon::isGoodMuon(), and muon::segmentCompatibility().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.first->y-chamberSegmentPair.second->y;
}
virtual TrackRef reco::Muon::dytTrack ( ) const [inline, virtual]

Reimplemented in pat::Muon.

Definition at line 60 of file Muon.h.

References DYT, and muonTrackFromMap().

Referenced by muonTrack().

{ return muonTrackFromMap(DYT);}
virtual TrackRef reco::Muon::globalTrack ( ) const [inline, virtual]
virtual TrackRef reco::Muon::innerTrack ( ) const [inline, virtual]

Reimplemented in pat::Muon.

Definition at line 49 of file Muon.h.

References innerTrack_.

Referenced by MuonPFAnalyzer::analyze(), HLTMuonMatchAndPlot::analyze(), EwkMuLumiMonitorDQM::analyze(), EwkMuDQM::analyze(), MuonEnergyDepositAnalyzer::analyze(), MuonCosmicCompatibilityFiller::backToBack2LegCosmic(), ZToMuMuGammaAnalyzer::basicMuonSelection(), FWMuonBuilder::buildMuon(), FWMuonBuilder::calculateField(), TCMETAlgo::CalculateTCMET(), MuonsFromRefitTracksProducer::cloneAndSwitchTrack(), pat::Muon::embedTrack(), MuonIdProducer::fillTrackerKink(), LeptonRecoSkim::filter(), WMuNuValidator::filter(), MuonMETAlgo::GetMuDepDeltas(), cms::MuonTCMETValueMapProducer::isGoodCaloMuon(), cms::MuonTCMETValueMapProducer::isGoodMuon(), muon::isGoodMuon(), cms::MuonTCMETValueMapProducer::isGoodTrack(), muon::isHighPtMuon(), MuonCosmicCompatibilityFiller::isOverlappingMuon(), SoftPFMuonTagInfoProducer::isSoftMuon(), muon::isSoftMuon(), muon::isTightMuon(), SoftPFMuonTagInfoProducer::isTightMuon(), BTagHLTOfflineSource::isVBTFMuon(), FourVectorHLTOffline::isVBTFMuon(), MuonIdProducer::makeCaloMuon(), MuonResidualsFromTrack::MuonResidualsFromTrack(), muonTrack(), MuonIdProducer::phiOfMuonIneteractionRegion(), helper::MuonCollectionStoreManager::processMuon(), OutsideInMuonSeeder::produce(), MuonIdProducer::produce(), cms::MuonMETValueMapProducer::produce(), cms::MuonTCMETValueMapProducer::produce(), cms::MuonTCMETValueMapProducer::propagateTrack(), MuonCosmicCompatibilityFiller::pvMatches(), BPhysicsOniaDQM::selGlobalMuon(), BPhysicsOniaDQM::selTrackerMuon(), muon::sigmaSwitch(), sigmaSwitch(), SoftPFMuonTagInfoProducer::tagMuon(), muon::tevOptimized(), tevOptimizedTMR(), and track().

{ return innerTrack_; }
bool Muon::isAValidMuonTrack ( const MuonTrackType type) const

Definition at line 853 of file Muon.cc.

References edm::Ref< C, T, F >::isNonnull(), and muonTrack().

Referenced by pat::PATMuonProducer::fillMuon().

                                                           {
  return muonTrack(type).isNonnull();
}
bool reco::Muon::isCaloCompatibilityValid ( ) const [inline]

Definition at line 153 of file Muon.h.

References caloCompatibility_.

Referenced by CaloMuonMerger::produce().

{ return caloCompatibility_>=0; } 
bool reco::Muon::isCaloMuon ( ) const [inline, virtual]
bool reco::Muon::isEnergyValid ( ) const [inline]

====================== ENERGY BLOCK ===========================

energy deposition

Definition at line 110 of file Muon.h.

References energyValid_.

Referenced by MuonTimingFiller::addEcalTime(), FWMuonDetailView::addSceneInfo(), FWMuonDetailView::build(), FWMuonLegoProxyBuilder::build(), MuonIdProducer::makeCaloMuon(), MuonIdProducer::produce(), and FWMuonDetailView::setTextInfo().

{ return energyValid_; }
bool reco::Muon::isGlobalMuon ( ) const [inline, virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 219 of file Muon.h.

References GlobalMuon, and type_.

Referenced by MuonRecoAnalyzer::analyze(), ZMuMu_efficiencyAnalyzer::analyze(), GlbMuQualityCutsAnalysis::analyze(), MuonKinVsEtaAnalyzer::analyze(), EwkMuLumiMonitorDQM::analyze(), RPCRecHitProbability::analyze(), ZMuMu_vtxAnalyzer::analyze(), RPCMonitorDigi::analyze(), EwkMuDQM::analyze(), MuTriggerAnalyzer::analyze(), HiggsDQM::analyze(), MuonEnergyDepositAnalyzer::analyze(), MuonCosmicCompatibilityFiller::backToBack2LegCosmic(), AlignmentMuonSelector::basicCuts(), ZToMuMuGammaAnalyzer::basicMuonSelection(), FWMuonBuilder::buildMuon(), TCMETAlgo::CalculateTCMET(), MuonCosmicCompatibilityFiller::combinedCosmicID(), TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::evaluateMuonVeto(), MuonIdProducer::fillGlbQuality(), EwkMuTauHistManager::fillHistograms(), MuonShowerInformationFiller::fillHitsByStation(), pat::PATMuonProducer::fillMuon(), WMuNuSelector::filter(), LeptonRecoSkim::filter(), WMuNuValidator::filter(), MuonMETAlgo::GetMuDepDeltas(), cms::MuonTCMETValueMapProducer::isGoodMuon(), muon::isGoodMuon(), muon::isHighPtMuon(), SoftPFMuonTagInfoProducer::isLooseMuon(), muon::isLooseMuon(), MuonCosmicCompatibilityFiller::isOverlappingMuon(), muon::isTightMuon(), SoftPFMuonTagInfoProducer::isTightMuon(), cms::MuonMETValueMapProducer::produce(), ZMuMuUserData::produce(), ZToLLEdmNtupleDumper::produce(), cms::MuonTCMETValueMapProducer::produce(), ZMuMuMuonUserData::produce(), MuonProducer::produce(), MuonGmtPair::pt(), MuonCosmicCompatibilityFiller::pvMatches(), and MuScleFitMuonSelector::selectMuons().

{ return type_ & GlobalMuon; }
bool reco::Muon::isIsolationValid ( ) const [inline]

Definition at line 171 of file Muon.h.

References isolationValid_.

Referenced by MuonMETAlgo::GetMuDepDeltas().

{ return isolationValid_; }
bool reco::Muon::isMatchesValid ( ) const [inline]

====================== MUON MATCH BLOCK ===========================

Definition at line 139 of file Muon.h.

References matchesValid_.

Referenced by FWMuonBuilder::buildMuon(), muon::isGoodMuon(), and MuonIdProducer::overlap().

{ return matchesValid_; }
bool reco::Muon::isMuon ( ) const [inline, virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 218 of file Muon.h.

{ return true; }
const MuonIsolation& reco::Muon::isolationR03 ( ) const [inline]
const MuonIsolation& reco::Muon::isolationR05 ( ) const [inline]

Definition at line 160 of file Muon.h.

References isolationR05_.

Referenced by EwkMuTauHistManager::fillHistograms().

{ return isolationR05_; }
bool reco::Muon::isPFIsolationValid ( ) const [inline]

Definition at line 175 of file Muon.h.

References pfIsolationValid_.

{ return pfIsolationValid_; }
bool reco::Muon::isPFMuon ( ) const [inline]
bool reco::Muon::isQualityValid ( ) const [inline]

====================== Quality BLOCK ===========================

energy deposition

Definition at line 120 of file Muon.h.

References qualityValid_.

Referenced by MuonIdProducer::fillTrackerKink(), and muon::isGoodMuon().

{ return qualityValid_; }
bool reco::Muon::isRPCMuon ( ) const [inline]

Definition at line 224 of file Muon.h.

References RPCMuon, and type_.

Referenced by MuonIdProducer::fillMuonId(), and muon::isGoodMuon().

{return type_ & RPCMuon;}
bool reco::Muon::isStandAloneMuon ( ) const [inline, virtual]
bool reco::Muon::isTimeValid ( ) const [inline]

====================== TIMING BLOCK ===========================

timing information

Definition at line 130 of file Muon.h.

References reco::MuonTime::nDof, and time_.

Referenced by MuonCosmicCompatibilityFiller::muonTiming(), and MuonIdProducer::produce().

{ return (time_.nDof>0); }
bool reco::Muon::isTrackerMuon ( ) const [inline, virtual]
std::vector<MuonChamberMatch>& reco::Muon::matches ( ) [inline]
const std::vector<MuonChamberMatch>& reco::Muon::matches ( ) const [inline]

Definition at line 142 of file Muon.h.

References muMatches_.

{ return muMatches_;    }
virtual TrackRef reco::Muon::muonBestTrack ( ) const [inline, virtual]
virtual MuonTrackType reco::Muon::muonBestTrackType ( ) const [inline, virtual]

Definition at line 65 of file Muon.h.

References bestTrackType_.

Referenced by MuonPFAnalyzer::muonTrackType().

{return bestTrackType_;}
TrackRef Muon::muonTrack ( const MuonTrackType type) const

Definition at line 857 of file Muon.cc.

References CombinedTrack, DYT, dytTrack(), globalTrack(), innerTrack(), InnerTrack, muonTrackFromMap(), OuterTrack, Picky, pickyTrack(), standAloneMuon(), TPFMS, and tpfmsTrack().

Referenced by bestTrack(), bestTrackRef(), isAValidMuonTrack(), muonBestTrack(), and tunePMuonBestTrack().

                                                       {
  switch (type) {
  case InnerTrack:     return innerTrack();
  case OuterTrack:     return standAloneMuon(); 
  case CombinedTrack:  return globalTrack();
  case TPFMS:          return tpfmsTrack();
  case Picky:          return pickyTrack();
  case DYT:            return dytTrack();
  default:             return muonTrackFromMap(type);
  }
}
TrackRef reco::Muon::muonTrackFromMap ( const MuonTrackType type) const [inline]

Definition at line 74 of file Muon.h.

References refittedTrackMap_.

Referenced by dytTrack(), muonTrack(), pickyTrack(), and tpfmsTrack().

                                                               {
      MuonTrackRefMap::const_iterator iter = refittedTrackMap_.find(type);
      if (iter != refittedTrackMap_.end()) 
        return iter->second;
      else 
        return TrackRef();
    }
int reco::Muon::numberOfChambers ( ) const [inline]

====================== USEFUL METHODs ===========================

number of chambers (MuonChamberMatches include RPC rolls)

Definition at line 185 of file Muon.h.

References muMatches_.

Referenced by numberOfChambersNoRPC(), ZToLLEdmNtupleDumper::produce(), and ZMuMuMuonUserData::produce().

{ return muMatches_.size(); }
int Muon::numberOfChambersNoRPC ( ) const

number of chambers not including RPC matches (MuonChamberMatches include RPC rolls)

Definition at line 48 of file Muon.cc.

References matches(), numberOfChambers(), MuonSubdetId::RPC, and pileupDistInMC::total.

{
  int total = 0;
  int nAll = numberOfChambers();
  for (int iC = 0; iC < nAll; ++iC){
    if (matches()[iC].detector() == MuonSubdetId::RPC) continue;
    total++;
  }

  return total;
}
int Muon::numberOfMatchedRPCLayers ( ArbitrationType  type = RPCHitAndTrackArbitration) const

get bit map of stations with tracks within given distance (in cm) of chamber edges bit assignments are same as above

Definition at line 203 of file Muon.cc.

References RPClayerMask().

Referenced by MuonIdProducer::isGoodRPCMuon().

{
   int layers(0);

   unsigned int theRPCLayerMask = RPClayerMask(type);
   // maximum ten layers because of 6 layers in barrel and 3 (4) layers in each endcap before (after) upscope
   for(int it = 0; it < 10; ++it)
     if (theRPCLayerMask & 1<<it)
       ++layers;

   return layers;
}
int Muon::numberOfMatchedStations ( ArbitrationType  type = SegmentAndTrackArbitration) const

get number of stations with matched segments just adds the bits returned by stationMask

Definition at line 110 of file Muon.cc.

References stationMask(), and mergeVDriftHistosByStation::stations.

Referenced by muon::isHighPtMuon(), muon::isTightMuon(), and SoftPFMuonTagInfoProducer::isTightMuon().

{
   int stations(0);

   unsigned int theStationMask = stationMask(type);
   // eight stations, eight bits
   for(int it = 0; it < 8; ++it)
      if (theStationMask & 1<<it)
         ++stations;

   return stations;
}
int Muon::numberOfMatches ( ArbitrationType  type = SegmentAndTrackArbitration) const

get number of chambers with matched segments

Definition at line 60 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInChamberByDR, matches(), muMatches_, NoArbitration, RPCHitAndTrackArbitration, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned, and SegmentArbitration.

Referenced by EwkMuDQM::analyze(), MuonCosmicCompatibilityFiller::checkMuonSegments(), TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::evaluateMuonVeto(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonIdProducer::fillMuonId(), TrackerMuonHitExtractor::getMuonHits(), muon::isGoodMuon(), MuonIdProducer::isGoodTrackerMuon(), BTagHLTOfflineSource::isVBTFMuon(), FourVectorHLTOffline::isVBTFMuon(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), ZToMuMuGammaAnalyzer::muonSelection(), muon::overlap(), ZToLLEdmNtupleDumper::produce(), ZMuMuMuonUserData::produce(), and PFMuonSelector::spring11Cuts().

{
   int matches(0);
   for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
         chamberMatch != muMatches_.end(); chamberMatch++ )
   {
      if(type == RPCHitAndTrackArbitration) {
         if(chamberMatch->rpcMatches.empty()) continue;
         matches += chamberMatch->rpcMatches.size();
         continue;
      }

      if(chamberMatch->segmentMatches.empty()) continue;
      if(type == NoArbitration) {
         matches++;
         continue;
      }

      for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
            segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
      {
         if(type == SegmentArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
               matches++;
               break;
            }
         if(type == SegmentAndTrackArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
               matches++;
               break;
            }
         if(type == SegmentAndTrackArbitrationCleaned)
           if(segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR) &&
                 segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR) && 
                 segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByCleaning)) {
             matches++;
             break;
           }
         if(type > 1<<7)
            if(segmentMatch->isMask(type)) {
               matches++;
               break;
            }
      }
   }

   return matches;
}
int Muon::numberOfSegments ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

get number of segments

Definition at line 318 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, muMatches_, NoArbitration, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned, and SegmentArbitration.

{
   int segments(0);
   for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
         chamberMatch != muMatches_.end(); chamberMatch++ )
   {
      if(chamberMatch->segmentMatches.empty()) continue;
      if(!(chamberMatch->station()==station && chamberMatch->detector()==muonSubdetId)) continue;

      if(type == NoArbitration) {
         segments += chamberMatch->segmentMatches.size();
         continue;
      }

      for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
            segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
      {
         if(type == SegmentArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) {
               segments++;
               break;
            }
         if(type == SegmentAndTrackArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
               segments++;
               break;
            }
         if(type == SegmentAndTrackArbitrationCleaned)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByCleaning)) {
               segments++;
               break;
            }
         if(type > 1<<7)
            if(segmentMatch->isMask(type)) {
               segments++;
               break;
            }
      }
   }

   return segments;
}
virtual TrackRef reco::Muon::outerTrack ( ) const [inline, virtual]
bool Muon::overlap ( const Candidate c) const [private, virtual]
std::pair< const MuonChamberMatch *, const MuonSegmentMatch * > Muon::pair ( const std::vector< const MuonChamberMatch * > &  chambers,
ArbitrationType  type = SegmentAndTrackArbitration 
) const [private]

get pointers to best segment and corresponding chamber in vector of chambers

Definition at line 374 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, m, NoArbitration, alignCSCRings::s, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned, and SegmentArbitration.

Referenced by dDxDz(), dDyDz(), dX(), dY(), pullDxDz(), pullDyDz(), pullX(), pullY(), segmentDxDz(), segmentDxDzErr(), segmentDyDz(), segmentDyDzErr(), segmentX(), segmentXErr(), segmentY(), segmentYErr(), trackDist(), trackDistErr(), trackDxDz(), trackDxDzErr(), trackDyDz(), trackDyDzErr(), trackEdgeX(), trackEdgeY(), trackX(), trackXErr(), trackY(), and trackYErr().

{
   MuonChamberMatch* m = 0;
   MuonSegmentMatch* s = 0;
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair(m,s);

   if(chambers.empty()) return chamberSegmentPair;
   for( std::vector<const MuonChamberMatch*>::const_iterator chamberMatch = chambers.begin();
         chamberMatch != chambers.end(); chamberMatch++ )
   {
      if((*chamberMatch)->segmentMatches.empty()) continue;
      if(type == NoArbitration)
         return std::make_pair(*chamberMatch, &((*chamberMatch)->segmentMatches.front()));

      for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = (*chamberMatch)->segmentMatches.begin();
            segmentMatch != (*chamberMatch)->segmentMatches.end(); segmentMatch++ )
      {
         if(type == SegmentArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) 
               return std::make_pair(*chamberMatch, &(*segmentMatch));
         if(type == SegmentAndTrackArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR))
               return std::make_pair(*chamberMatch, &(*segmentMatch));
         if(type == SegmentAndTrackArbitrationCleaned)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByCleaning))
               return std::make_pair(*chamberMatch, &(*segmentMatch));
         if(type > 1<<7)
            if(segmentMatch->isMask(type))
               return std::make_pair(*chamberMatch, &(*segmentMatch));
      }
   }

   return chamberSegmentPair;
}
const MuonPFIsolation& reco::Muon::pfIsolationR03 ( ) const [inline]

Definition at line 162 of file Muon.h.

References pfIsolationR03_.

{ return pfIsolationR03_; }
const MuonPFIsolation& reco::Muon::pfIsolationR04 ( ) const [inline]

Definition at line 165 of file Muon.h.

References pfIsolationR04_.

{ return pfIsolationR04_; }
const MuonPFIsolation& reco::Muon::pfMeanDRIsoProfileR03 ( ) const [inline]

Definition at line 163 of file Muon.h.

References pfIsoMeanDRR03_.

{ return pfIsoMeanDRR03_; }
const MuonPFIsolation& reco::Muon::pfMeanDRIsoProfileR04 ( ) const [inline]

Definition at line 166 of file Muon.h.

References pfIsoMeanDRR04_.

{ return pfIsoMeanDRR04_; }
reco::Candidate::LorentzVector reco::Muon::pfP4 ( ) const [inline]

set reference to PFCandidate

====================== PF BLOCK ===========================

Definition at line 103 of file Muon.h.

References pfP4_.

Referenced by RecoMuonValidator::MuonME::fill(), and MuonProducer::produce().

{return pfP4_;}
const MuonPFIsolation& reco::Muon::pfSumDRIsoProfileR03 ( ) const [inline]

Definition at line 164 of file Muon.h.

References pfIsoSumDRR03_.

{ return pfIsoSumDRR03_; }
const MuonPFIsolation& reco::Muon::pfSumDRIsoProfileR04 ( ) const [inline]

Definition at line 167 of file Muon.h.

References pfIsoSumDRR04_.

{ return pfIsoSumDRR04_; }
virtual TrackRef reco::Muon::pickyTrack ( ) const [inline, virtual]

Reimplemented in pat::Muon.

Definition at line 59 of file Muon.h.

References muonTrackFromMap(), and Picky.

Referenced by muonTrack(), and muon::tevOptimized().

{ return muonTrackFromMap(Picky);}
float Muon::pullDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration,
bool  includeSegmentError = true 
) const

Definition at line 468 of file Muon.cc.

References chambers(), pair(), funct::pow(), and mathSSE::sqrt().

Referenced by muon::isGoodMuon().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   if(includeSegmentError)
      return (chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ)/sqrt(pow(chamberSegmentPair.first->dXdZErr,2)+pow(chamberSegmentPair.second->dXdZErr,2));
   return (chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ)/chamberSegmentPair.first->dXdZErr;
}
float Muon::pullDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration,
bool  includeSegmentError = true 
) const

Definition at line 478 of file Muon.cc.

References chambers(), MuonSubdetId::DT, pair(), funct::pow(), and mathSSE::sqrt().

Referenced by muon::isGoodMuon().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   if(includeSegmentError)
      return (chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ)/sqrt(pow(chamberSegmentPair.first->dYdZErr,2)+pow(chamberSegmentPair.second->dYdZErr,2));
   return (chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ)/chamberSegmentPair.first->dYdZErr;
}
float Muon::pullX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration,
bool  includeSegmentError = true 
) const

Definition at line 447 of file Muon.cc.

References chambers(), pair(), funct::pow(), and mathSSE::sqrt().

Referenced by muon::isGoodMuon(), and muon::segmentCompatibility().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   if(includeSegmentError)
      return (chamberSegmentPair.first->x-chamberSegmentPair.second->x)/sqrt(pow(chamberSegmentPair.first->xErr,2)+pow(chamberSegmentPair.second->xErr,2));
   return (chamberSegmentPair.first->x-chamberSegmentPair.second->x)/chamberSegmentPair.first->xErr;
}
float Muon::pullY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration,
bool  includeSegmentError = true 
) const

Definition at line 457 of file Muon.cc.

References chambers(), MuonSubdetId::DT, pair(), funct::pow(), and mathSSE::sqrt().

Referenced by muon::isGoodMuon(), and muon::segmentCompatibility().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   if(includeSegmentError)
      return (chamberSegmentPair.first->y-chamberSegmentPair.second->y)/sqrt(pow(chamberSegmentPair.first->yErr,2)+pow(chamberSegmentPair.second->yErr,2));
   return (chamberSegmentPair.first->y-chamberSegmentPair.second->y)/chamberSegmentPair.first->yErr;
}
unsigned int Muon::RPClayerMask ( ArbitrationType  type = RPCHitAndTrackArbitration) const

Definition at line 216 of file Muon.cc.

References RPCDetId::layer(), muMatches_, DetId::rawId(), and RPCDetId::region().

Referenced by numberOfMatchedRPCLayers().

{
   unsigned int totMask(0);
   unsigned int curMask(0);
   for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
         chamberMatch != muMatches_.end(); chamberMatch++ )
   {
      if(chamberMatch->rpcMatches.empty()) continue;
         
      RPCDetId rollId = chamberMatch->id.rawId();
      const int region = rollId.region();

      const int layer  = rollId.layer();
      int rpcLayer = chamberMatch->station();
      if (region==0) {
         rpcLayer = chamberMatch->station()-1 + chamberMatch->station()*layer;
         if ((chamberMatch->station()==2 && layer==2) || (chamberMatch->station()==4 && layer==1)) rpcLayer -= 1;
      } else rpcLayer += 6;
         
      for( std::vector<MuonRPCHitMatch>::const_iterator rpcMatch = chamberMatch->rpcMatches.begin();
            rpcMatch != chamberMatch->rpcMatches.end(); rpcMatch++ )
      {
         curMask = 1<<(rpcLayer-1);

         // do not double count
         if(!(totMask & curMask))
            totMask += curMask;
      }
   }
   
   return totMask;

}
float Muon::segmentDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 506 of file Muon.cc.

References chambers(), and pair().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.second->dXdZ;
}
float Muon::segmentDxDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 540 of file Muon.cc.

References chambers(), and pair().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.second->dXdZErr;
}
float Muon::segmentDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 514 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.second->dYdZ;
}
float Muon::segmentDyDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 548 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.second->dYdZErr;
}
float Muon::segmentX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

get (best) segment information If no segment returns 999999

Definition at line 489 of file Muon.cc.

References chambers(), and pair().

Referenced by muon::segmentCompatibility().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.second->x;
}
float Muon::segmentXErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 523 of file Muon.cc.

References chambers(), and pair().

{
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasPhi()) return 999999;
   return chamberSegmentPair.second->xErr;
}
float Muon::segmentY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 497 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.second->y;
}
float Muon::segmentYErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 531 of file Muon.cc.

References chambers(), MuonSubdetId::DT, and pair().

{
   if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
   if(! chamberSegmentPair.second->hasZed()) return 999999;
   return chamberSegmentPair.second->yErr;
}
virtual void reco::Muon::setBestTrack ( MuonTrackType  muonType) [inline, virtual]
void reco::Muon::setCalEnergy ( const MuonEnergy calEnergy) [inline]

set energy deposition information

Definition at line 114 of file Muon.h.

References calEnergy(), calEnergy_, and energyValid_.

Referenced by MuonIdProducer::fillMuonId(), and CaloMuonMerger::produce().

void reco::Muon::setCaloCompatibility ( float  input) [inline]

Definition at line 152 of file Muon.h.

References caloCompatibility_, and LaserDQM_cfg::input.

Referenced by CaloMuonMerger::produce().

void Muon::setCombined ( const TrackRef t) [virtual]

Definition at line 850 of file Muon.cc.

References setGlobalTrack().

Referenced by GlobalMuonToMuonProducer::produce().

void reco::Muon::setCombinedQuality ( const MuonQuality combinedQuality) [inline]

set energy deposition information

Definition at line 124 of file Muon.h.

References combinedQuality(), combinedQuality_, and qualityValid_.

Referenced by MuonIdProducer::fillGlbQuality(), and MuonIdProducer::fillTrackerKink().

void Muon::setGlobalTrack ( const TrackRef t) [virtual]
void Muon::setInnerTrack ( const TrackRef t) [virtual]
void Muon::setIsolation ( const MuonIsolation isoR03,
const MuonIsolation isoR05 
)

Definition at line 805 of file Muon.cc.

References isolationR03_, isolationR05_, and isolationValid_.

Referenced by MuonIdProducer::fillMuonIsolation(), and MuonWithPFIsoProducer::produce().

{ 
   isolationR03_ = isoR03;
   isolationR05_ = isoR05;
   isolationValid_ = true; 
}
void reco::Muon::setMatches ( const std::vector< MuonChamberMatch > &  matches) [inline]

set muon matching information

Definition at line 144 of file Muon.h.

References matches(), matchesValid_, and muMatches_.

Referenced by MuonIdProducer::fillMuonId().

void Muon::setMuonTrack ( const MuonTrackType type,
const TrackRef t 
)

Definition at line 869 of file Muon.cc.

References CombinedTrack, InnerTrack, OuterTrack, refittedTrackMap_, setGlobalTrack(), setInnerTrack(), setStandAlone(), lumiQTWidget::t, and type().

Referenced by MuonIdProducer::makeMuon().

                                                                    {
  
  switch (type) {
  case InnerTrack:    setInnerTrack(t);             break;
  case OuterTrack:    setStandAlone(t);             break;
  case CombinedTrack: setGlobalTrack(t);            break;
  default:            refittedTrackMap_[type] = t;  break;
  }

}
void Muon::setOuterTrack ( const TrackRef t) [virtual]
void Muon::setPFIsolation ( const std::string &  label,
const reco::MuonPFIsolation deposit 
)

Definition at line 813 of file Muon.cc.

References pfIsolationR03_, pfIsolationR04_, pfIsolationValid_, pfIsoMeanDRR03_, pfIsoMeanDRR04_, pfIsoSumDRR03_, and pfIsoSumDRR04_.

Referenced by MuPFIsoHelper::embedPFIsolation().

{ 
  if(label=="pfIsolationR03")
    pfIsolationR03_ = deposit;

  if(label=="pfIsolationR04")
    pfIsolationR04_ = deposit;

  if(label=="pfIsoMeanDRProfileR03")
    pfIsoMeanDRR03_ = deposit;

  if(label=="pfIsoMeanDRProfileR04")
    pfIsoMeanDRR04_ = deposit;

  if(label=="pfIsoSumDRProfileR03")
    pfIsoSumDRR03_ = deposit;

  if(label=="pfIsoSumDRProfileR04")
    pfIsoSumDRR04_ = deposit;

   pfIsolationValid_ = true; 
}
void Muon::setPFP4 ( const reco::Candidate::LorentzVector p4_) [virtual]

Definition at line 837 of file Muon.cc.

References reco::LeafCandidate::p4(), PFMuon, pfP4_, and type_.

Referenced by MuonProducer::produce().

{ 
    pfP4_ = p4;
    type_ = type_ | PFMuon;
}
void Muon::setStandAlone ( const TrackRef t) [virtual]

Definition at line 848 of file Muon.cc.

References setOuterTrack().

Referenced by GlobalMuonToMuonProducer::produce(), and setMuonTrack().

{ setOuterTrack(t); }
void reco::Muon::setTime ( const MuonTime time) [inline]

set timing information

Definition at line 134 of file Muon.h.

References time(), and time_.

{ time_ = time; }
void Muon::setTrack ( const TrackRef t) [virtual]

Definition at line 847 of file Muon.cc.

References setInnerTrack().

Referenced by GlobalMuonToMuonProducer::produce().

{ setInnerTrack(t); }
virtual void reco::Muon::setTunePBestTrack ( MuonTrackType  muonType) [inline, virtual]

Definition at line 94 of file Muon.h.

References bestTunePTrackType_.

Referenced by MuonIdProducer::makeMuon().

{bestTunePTrackType_ = muonType;}
void reco::Muon::setType ( unsigned int  type) [inline]

Definition at line 215 of file Muon.h.

References type(), and type_.

Referenced by MuonIdProducer::produce(), and CaloMuonMerger::produce().

{ type_ = type; }
virtual TrackRef reco::Muon::standAloneMuon ( ) const [inline, virtual]
unsigned int Muon::stationGapMaskDistance ( float  distanceCut = 10.) const

Definition at line 250 of file Muon.cc.

References muMatches_, and plotscripts::stationIndex().

{
   unsigned int totMask(0);
   for( int stationIndex = 1; stationIndex < 5; stationIndex++ )
   {
      for( int detectorIndex = 1; detectorIndex < 4; detectorIndex++ )
      {
         unsigned int curMask(0);
         for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
               chamberMatch != muMatches_.end(); chamberMatch++ )
         {
            if(!(chamberMatch->station()==stationIndex && chamberMatch->detector()==detectorIndex)) continue;

            float edgeX = chamberMatch->edgeX;
            float edgeY = chamberMatch->edgeY;
            if(edgeX<0 && fabs(edgeX)>fabs(distanceCut) &&
                  edgeY<0 && fabs(edgeY)>fabs(distanceCut)) // inside the chamber so negates all gaps for this station
            {
               curMask = 0;
               break;
            }
            if( ( fabs(edgeX) < fabs(distanceCut) && edgeY < fabs(distanceCut) ) ||
                ( fabs(edgeY) < fabs(distanceCut) && edgeX < fabs(distanceCut) ) ) // inside gap
               curMask = 1<<( (stationIndex-1)+4*(detectorIndex-1) );
         }

         totMask += curMask; // add to total mask
      }
   }

   return totMask;
}
unsigned int Muon::stationGapMaskPull ( float  sigmaCut = 3.) const

same as above for given number of sigmas

Definition at line 283 of file Muon.cc.

References muMatches_, and plotscripts::stationIndex().

{
   unsigned int totMask(0);
   for( int stationIndex = 1; stationIndex < 5; stationIndex++ )
   {
      for( int detectorIndex = 1; detectorIndex < 4; detectorIndex++ )
      {
         unsigned int curMask(0);
         for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
               chamberMatch != muMatches_.end(); chamberMatch++ )
         {
            if(!(chamberMatch->station()==stationIndex && chamberMatch->detector()==detectorIndex)) continue;

            float edgeX = chamberMatch->edgeX;
            float edgeY = chamberMatch->edgeY;
            float xErr  = chamberMatch->xErr+0.000001; // protect against division by zero later
            float yErr  = chamberMatch->yErr+0.000001; // protect against division by zero later
            if(edgeX<0 && fabs(edgeX/xErr)>fabs(sigmaCut) &&
                  edgeY<0 && fabs(edgeY/yErr)>fabs(sigmaCut)) // inside the chamber so negates all gaps for this station
            {
               curMask = 0;
               break;
            }
            if( ( fabs(edgeX/xErr) < fabs(sigmaCut) && edgeY/yErr < fabs(sigmaCut) ) ||
                ( fabs(edgeY/yErr) < fabs(sigmaCut) && edgeX/xErr < fabs(sigmaCut) ) ) // inside gap
               curMask = 1<<((stationIndex-1)+4*(detectorIndex-1));
         }

         totMask += curMask; // add to total mask
      }
   }

   return totMask;
}
unsigned int Muon::stationMask ( ArbitrationType  type = SegmentAndTrackArbitration) const

get bit map of stations with matched segments bits 0-1-2-3 = DT stations 1-2-3-4 bits 4-5-6-7 = CSC stations 1-2-3-4

Definition at line 123 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, muMatches_, NoArbitration, DetId::rawId(), RPCDetId::region(), RPCHitAndTrackArbitration, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned, and SegmentArbitration.

Referenced by muon::isGoodMuon(), and numberOfMatchedStations().

{
   unsigned int totMask(0);
   unsigned int curMask(0);

   for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
         chamberMatch != muMatches_.end(); chamberMatch++ )
   {
      if(type == RPCHitAndTrackArbitration) {
         if(chamberMatch->rpcMatches.empty()) continue;

         RPCDetId rollId = chamberMatch->id.rawId();
         const int region    = rollId.region();
         int rpcIndex = 1; if (region!=0) rpcIndex = 2;

         for( std::vector<MuonRPCHitMatch>::const_iterator rpcMatch = chamberMatch->rpcMatches.begin();
               rpcMatch != chamberMatch->rpcMatches.end(); rpcMatch++ )
         {
            curMask = 1<<( (chamberMatch->station()-1)+4*(rpcIndex-1) );

            // do not double count
            if(!(totMask & curMask))
               totMask += curMask;
         }
         continue;
      }

      if(chamberMatch->segmentMatches.empty()) continue;
      if(type == NoArbitration) {
         curMask = 1<<( (chamberMatch->station()-1)+4*(chamberMatch->detector()-1) );
         // do not double count
         if(!(totMask & curMask))
            totMask += curMask;
         continue;
      }

      for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
            segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
      {
         if(type == SegmentArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) {
               curMask = 1<<( (chamberMatch->station()-1)+4*(chamberMatch->detector()-1) );
               // do not double count
               if(!(totMask & curMask))
                  totMask += curMask;
               break;
            }
         if(type == SegmentAndTrackArbitration)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
               curMask = 1<<( (chamberMatch->station()-1)+4*(chamberMatch->detector()-1) );
               // do not double count
               if(!(totMask & curMask))
                  totMask += curMask;
               break;
            }
         if(type == SegmentAndTrackArbitrationCleaned)
            if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR) &&
                  segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByCleaning)) {
               curMask = 1<<( (chamberMatch->station()-1)+4*(chamberMatch->detector()-1) );
               // do not double count
               if(!(totMask & curMask))
                  totMask += curMask;
               break;
            }
         if(type > 1<<7)
            if(segmentMatch->isMask(type)) {
               curMask = 1<<( (chamberMatch->station()-1)+4*(chamberMatch->detector()-1) );
               // do not double count
               if(!(totMask & curMask))
                  totMask += curMask;
               break;
            }
      }
   }

   return totMask;
}
float reco::Muon::t0 ( int  n = 0) [inline]

Definition at line 323 of file Muon.h.

References i, muMatches_, and n.

                       {
        int i = 0;
        for( std::vector<MuonChamberMatch>::const_iterator chamber = muMatches_.begin();
             chamber != muMatches_.end(); ++chamber )
          for ( std::vector<reco::MuonSegmentMatch>::const_iterator segment = chamber->segmentMatches.begin();
                segment != chamber->segmentMatches.end(); ++segment )
            {
               if (i==n) return segment->t0;
               ++i;
            }
        return 0;
     }
MuonTime reco::Muon::time ( ) const [inline]

get timing information

Definition at line 132 of file Muon.h.

References time_.

Referenced by MuonCosmicCompatibilityFiller::muonTiming(), MuonIdProducer::produce(), and setTime().

{ return time_; }
virtual TrackRef reco::Muon::tpfmsTrack ( ) const [inline, virtual]

Reimplemented in pat::Muon.

Definition at line 58 of file Muon.h.

References muonTrackFromMap(), and TPFMS.

Referenced by muonTrack(), and muon::tevOptimized().

{ return muonTrackFromMap(TPFMS);}
virtual TrackRef reco::Muon::track ( void  ) const [inline, virtual]
float Muon::trackDist ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 767 of file Muon.cc.

References chambers(), and pair().

Referenced by muon::RequiredStationMask(), and muon::segmentCompatibility().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) dist  = currDist;
      }
      return dist;
   } else return chamberSegmentPair.first->dist();
}
float Muon::trackDistErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 784 of file Muon.cc.

References chambers(), and pair().

Referenced by muon::RequiredStationMask().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->distErr();
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->distErr();
}
float Muon::trackDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 641 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->dXdZ;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->dXdZ;
}
float Muon::trackDxDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 725 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->dXdZErr;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->dXdZErr;
}
float Muon::trackDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 662 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->dYdZ;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->dYdZ;
}
float Muon::trackDyDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 746 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->dYdZErr;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->dYdZErr;
}
float Muon::trackEdgeX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

get track information in chamber that contains (best) segment If no segment, get track information in chamber that has the most negative distance between the track and the nearest chamber edge (the chamber with the deepest track) If no chamber returns 999999

Definition at line 557 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->edgeX;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->edgeX;
}
float Muon::trackEdgeY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 578 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->edgeY;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->edgeY;
}
float Muon::trackX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 599 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->x;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->x;
}
float Muon::trackXErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 683 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->xErr;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->xErr;
}
float Muon::trackY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 620 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->y;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->y;
}
float Muon::trackYErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 704 of file Muon.cc.

References chambers(), and pair().

{
   const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
   if(muonChambers.empty()) return 999999;

   std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
   if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
      float dist  = 999999;
      float supVar = 999999;
      for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
            muonChamber != muonChambers.end(); ++muonChamber) {
         float currDist = (*muonChamber)->dist();
         if(currDist<dist) {
            dist  = currDist;
            supVar = (*muonChamber)->yErr;
         }
      }
      return supVar;
   } else return chamberSegmentPair.first->yErr;
}
virtual TrackRef reco::Muon::tunePMuonBestTrack ( ) const [inline, virtual]

Definition at line 66 of file Muon.h.

References bestTunePTrackType_, and muonTrack().

Referenced by MuonPFAnalyzer::analyze(), and MuonRecoAnalyzer::analyze().

virtual MuonTrackType reco::Muon::tunePMuonBestTrackType ( ) const [inline, virtual]

Definition at line 67 of file Muon.h.

References bestTunePTrackType_.

Referenced by MuonPFAnalyzer::muonTrackType().

unsigned int reco::Muon::type ( ) const [inline]

Definition at line 216 of file Muon.h.

References type_.

Referenced by CaloMuonMerger::produce(), pat::Muon::setDB(), setMuonTrack(), and setType().

{ return type_; }

Member Data Documentation

reference to the Track chosen to assign the momentum value to the muon

Definition at line 238 of file Muon.h.

Referenced by bestTrack(), bestTrackRef(), Muon(), muonBestTrack(), muonBestTrackType(), and setBestTrack().

reference to the Track chosen to assign the momentum value to the muon by PF

Definition at line 240 of file Muon.h.

Referenced by Muon(), setTunePBestTrack(), tunePMuonBestTrack(), and tunePMuonBestTrackType().

energy deposition

Definition at line 243 of file Muon.h.

Referenced by calEnergy(), and setCalEnergy().

muon hypothesis compatibility with observer calorimeter energy

Definition at line 256 of file Muon.h.

Referenced by caloCompatibility(), isCaloCompatibilityValid(), Muon(), and setCaloCompatibility().

const unsigned int reco::Muon::CaloMuon = 1<<4 [static]

Definition at line 211 of file Muon.h.

Referenced by isCaloMuon(), and CaloMuonMerger::produce().

quality block

Definition at line 245 of file Muon.h.

Referenced by combinedQuality(), and setCombinedQuality().

bool reco::Muon::energyValid_ [private]

Definition at line 250 of file Muon.h.

Referenced by isEnergyValid(), Muon(), and setCalEnergy().

const unsigned int reco::Muon::GlobalMuon = 1<<1 [static]

muon type - type of the algorithm that reconstructed this muon multiple algorithms can reconstruct the same muon

Definition at line 208 of file Muon.h.

Referenced by isGlobalMuon(), and MuonIdProducer::produce().

reference to Track reconstructed in both tracked and muon detector

Definition at line 234 of file Muon.h.

Referenced by globalTrack(), and setGlobalTrack().

reference to Track reconstructed in the tracker only

Definition at line 230 of file Muon.h.

Referenced by innerTrack(), and setInnerTrack().

Isolation information for two cones with dR=0.3 and dR=0.5.

Definition at line 258 of file Muon.h.

Referenced by isolationR03(), and setIsolation().

Definition at line 259 of file Muon.h.

Referenced by isolationR05(), and setIsolation().

Definition at line 252 of file Muon.h.

Referenced by isIsolationValid(), Muon(), and setIsolation().

bool reco::Muon::matchesValid_ [private]

Definition at line 251 of file Muon.h.

Referenced by isMatchesValid(), Muon(), and setMatches().

std::vector<MuonChamberMatch> reco::Muon::muMatches_ [private]

Information on matching between tracks and segments.

Definition at line 247 of file Muon.h.

Referenced by chambers(), matches(), numberOfChambers(), numberOfMatches(), numberOfSegments(), RPClayerMask(), setMatches(), stationGapMaskDistance(), stationGapMaskPull(), stationMask(), and t0().

reference to Track reconstructed in the muon detector only

Definition at line 232 of file Muon.h.

Referenced by outerTrack(), and setOuterTrack().

PF Isolation information for two cones with dR=0.3 and dR=0.4.

Definition at line 262 of file Muon.h.

Referenced by pfIsolationR03(), and setPFIsolation().

Definition at line 265 of file Muon.h.

Referenced by pfIsolationR04(), and setPFIsolation().

Definition at line 253 of file Muon.h.

Referenced by isPFIsolationValid(), Muon(), and setPFIsolation().

Definition at line 263 of file Muon.h.

Referenced by pfMeanDRIsoProfileR03(), and setPFIsolation().

Definition at line 266 of file Muon.h.

Referenced by pfMeanDRIsoProfileR04(), and setPFIsolation().

Definition at line 264 of file Muon.h.

Referenced by pfSumDRIsoProfileR03(), and setPFIsolation().

Definition at line 267 of file Muon.h.

Referenced by pfSumDRIsoProfileR04(), and setPFIsolation().

const unsigned int reco::Muon::PFMuon = 1<<5 [static]

Definition at line 212 of file Muon.h.

Referenced by isPFMuon(), and setPFP4().

Definition at line 273 of file Muon.h.

Referenced by pfP4(), and setPFP4().

bool reco::Muon::qualityValid_ [private]

Definition at line 254 of file Muon.h.

Referenced by isQualityValid(), Muon(), and setCombinedQuality().

reference to the Global Track refitted with dedicated TeV reconstructors

Definition at line 236 of file Muon.h.

Referenced by muonTrackFromMap(), and setMuonTrack().

const unsigned int reco::Muon::RPCMuon = 1<<6 [static]

Definition at line 213 of file Muon.h.

Referenced by isRPCMuon(), and MuonIdProducer::produce().

const unsigned int reco::Muon::StandAloneMuon = 1<<3 [static]

Definition at line 210 of file Muon.h.

Referenced by isStandAloneMuon(), and MuonIdProducer::produce().

timing

Definition at line 249 of file Muon.h.

Referenced by isTimeValid(), setTime(), and time().

const unsigned int reco::Muon::TrackerMuon = 1<<2 [static]

Definition at line 209 of file Muon.h.

Referenced by isTrackerMuon(), and MuonIdProducer::produce().

unsigned int reco::Muon::type_ [private]