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 }
 

define arbitration schemes

More...

Public Member Functions

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 globalTrack () const
 reference to Track reconstructed in both tracked and muon detector
virtual TrackRef innerTrack () 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 isQualityValid () 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 ()
int numberOfChambers () 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
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
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
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
virtual void setOuterTrack (const TrackRef &t)
 set reference to Track
virtual void setStandAlone (const TrackRef &t)
void setTime (const MuonTime &time)
 set timing information
virtual void setTrack (const TrackRef &t)
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 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
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 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

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
bool qualityValid_
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
Version:
Id:
Muon.h,v 1.59 2011/01/29 00:32:44 jribnik Exp

Definition at line 25 of file Muon.h.


Member Enumeration Documentation

define arbitration schemes

Enumerator:
NoArbitration 
SegmentArbitration 
SegmentAndTrackArbitration 
SegmentAndTrackArbitrationCleaned 

Definition at line 115 of file Muon.h.


Constructor & Destructor Documentation

Muon::Muon ( )

Reimplemented in pat::Muon.

Definition at line 16 of file Muon.cc.

References caloCompatibility_, energyValid_, isolationValid_, matchesValid_, qualityValid_, and type_.

Referenced by clone().

           {
   energyValid_  = false;
   matchesValid_ = false;
   isolationValid_ = false;
   qualityValid_ = false;
   caloCompatibility_ = -9999.;
   type_ = 0;
}
Muon::Muon ( Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ) 
)

constructor from values

Definition at line 6 of file Muon.cc.

References caloCompatibility_, energyValid_, isolationValid_, matchesValid_, qualityValid_, and type_.

                                                                   :
  RecoCandidate( q, p4, vtx, -13 * q ) {
     energyValid_  = false;
     matchesValid_ = false;
     isolationValid_ = false;
     qualityValid_ = false;
     caloCompatibility_ = -9999.;
     type_ = 0;
}

Member Function Documentation

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 101 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 271 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 36 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 72 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 337 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 345 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 320 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 328 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::globalTrack ( ) const [inline, virtual]
virtual TrackRef reco::Muon::innerTrack ( ) const [inline, virtual]
bool reco::Muon::isCaloCompatibilityValid ( ) const [inline]

Definition at line 103 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 60 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]
bool reco::Muon::isIsolationValid ( ) const [inline]

Definition at line 112 of file Muon.h.

References isolationValid_.

Referenced by MuonMETAlgo::GetMuDepDeltas().

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

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

Definition at line 89 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 147 of file Muon.h.

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

Definition at line 110 of file Muon.h.

References isolationR05_.

Referenced by EwkMuTauHistManager::fillHistograms().

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

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

energy deposition

Definition at line 70 of file Muon.h.

References qualityValid_.

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

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

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

timing information

Definition at line 80 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]
const std::vector<MuonChamberMatch>& reco::Muon::matches ( ) const [inline]

Definition at line 92 of file Muon.h.

References muMatches_.

{ return muMatches_;    }
std::vector<MuonChamberMatch>& reco::Muon::matches ( ) [inline]
int reco::Muon::numberOfChambers ( ) const [inline]

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

number of chambers

Definition at line 121 of file Muon.h.

References muMatches_.

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

{ return muMatches_.size(); }
int Muon::numberOfMatchedStations ( ArbitrationType  type = SegmentAndTrackArbitration) const

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

Definition at line 84 of file Muon.cc.

References stationMask(), and mergeVDriftHistosByStation::stations.

{
   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 40 of file Muon.cc.

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

Referenced by MuonKinVsEtaAnalyzer::analyze(), EwkMuDQM::analyze(), MuonCosmicCompatibilityFiller::checkMuonSegments(), TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::evaluateMuonVeto(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonIdProducer::fillMuonId(), TrackerMuonHitExtractor::getMuonHits(), muon::isGoodMuon(), MuonIdProducer::isGoodTrackerMuon(), BTagHLTOfflineSource::isVBTFMuon(), FourVectorHLTOffline::isVBTFMuon(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), 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(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 225 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 281 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, m, NoArbitration, asciidump::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;
}
float Muon::pullDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration,
bool  includeSegmentError = true 
) const

Definition at line 375 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 385 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 354 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 364 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;
}
float Muon::segmentDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 413 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 447 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 421 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 455 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 396 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 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.second->xErr;
}
float Muon::segmentY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentAndTrackArbitration 
) const

Definition at line 404 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 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.second->yErr;
}
void reco::Muon::setCalEnergy ( const MuonEnergy calEnergy) [inline]

set energy deposition information

Definition at line 64 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 102 of file Muon.h.

References caloCompatibility_, and collect_tpl::input.

Referenced by CaloMuonMerger::produce().

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

Definition at line 724 of file Muon.cc.

References setGlobalTrack().

Referenced by MuonProducer::produce().

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

set energy deposition information

Definition at line 74 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 712 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 94 of file Muon.h.

References matches(), matchesValid_, and muMatches_.

Referenced by MuonIdProducer::fillMuonId().

void Muon::setOuterTrack ( const TrackRef t) [virtual]
void Muon::setStandAlone ( const TrackRef t) [virtual]

Definition at line 722 of file Muon.cc.

References setOuterTrack().

Referenced by MuonProducer::produce().

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

set timing information

Definition at line 84 of file Muon.h.

References time(), and time_.

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

Definition at line 721 of file Muon.cc.

References setInnerTrack().

Referenced by MuonProducer::produce().

{ setInnerTrack(t); }
void reco::Muon::setType ( unsigned int  type) [inline]

Definition at line 144 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

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

Definition at line 157 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 190 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 97 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, muMatches_, NoArbitration, 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(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 231 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 82 of file Muon.h.

References time_.

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

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

Definition at line 674 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 691 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 548 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 632 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 569 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 653 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 464 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 485 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 506 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 590 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 527 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 611 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;
}
unsigned int reco::Muon::type ( ) const [inline]

Definition at line 145 of file Muon.h.

References type_.

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

{ return type_; }

Member Data Documentation

energy deposition

Definition at line 163 of file Muon.h.

Referenced by calEnergy(), and setCalEnergy().

muon hypothesis compatibility with observer calorimeter energy

Definition at line 176 of file Muon.h.

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

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

Definition at line 143 of file Muon.h.

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

quality block

Definition at line 165 of file Muon.h.

Referenced by combinedQuality(), and setCombinedQuality().

bool reco::Muon::energyValid_ [private]

Definition at line 171 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 140 of file Muon.h.

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

reference to Track reconstructed in both tracked and muon detector

Definition at line 161 of file Muon.h.

Referenced by globalTrack(), and setGlobalTrack().

reference to Track reconstructed in the tracker only

Definition at line 157 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 178 of file Muon.h.

Referenced by isolationR03(), and setIsolation().

Definition at line 179 of file Muon.h.

Referenced by isolationR05(), and setIsolation().

Definition at line 173 of file Muon.h.

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

bool reco::Muon::matchesValid_ [private]

Definition at line 172 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 167 of file Muon.h.

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

reference to Track reconstructed in the muon detector only

Definition at line 159 of file Muon.h.

Referenced by outerTrack(), and setOuterTrack().

bool reco::Muon::qualityValid_ [private]

Definition at line 174 of file Muon.h.

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

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

Definition at line 142 of file Muon.h.

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

timing

Definition at line 169 of file Muon.h.

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

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

Definition at line 141 of file Muon.h.

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

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

muon type mask

Definition at line 181 of file Muon.h.

Referenced by pat::Muon::dB(), pat::Muon::edB(), isCaloMuon(), isGlobalMuon(), isStandAloneMuon(), isTrackerMuon(), Muon(), setType(), and type().