CMS 3D CMS Logo

reco::Muon Class Reference

A reconstructed Muon. More...

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

Inheritance diagram for reco::Muon:

reco::RecoCandidate reco::LeafCandidate reco::Candidate reco::Particle pat::PATObject< reco::Muon > pat::Lepton< reco::Muon >

List of all members.

Public Types

enum  ArbitrationType { NoArbitration, SegmentArbitration, SegmentAndTrackArbitration }
 define arbitration schemes More...
enum  SelectionType {
  All, AllGlobalMuons, AllStandAloneMuons, AllTrackerMuons,
  TrackerMuonArbitrated, AllArbitrated, GlobalMuonPromptTight, TMLastStationLoose,
  TMLastStationTight, TM2DCompatibilityLoose, TM2DCompatibilityTight, TMOneStationLoose,
  TMOneStationTight, TMLastStationOptimizedLowPtLoose, TMLastStationOptimizedLowPtTight
}
 ====================== SELECTOR BLOCK =========================== More...

Public Member Functions

MuonEnergy calEnergy () const
 get energy deposition information
float caloCompatibility () const
 ====================== MUON COMPATIBILITY BLOCK ===========================
Muonclone () const
 create a clone
virtual TrackRef combinedMuon () const __attribute__((deprecated))
 reference to a stand-alone muon Track
float dDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float dDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float dX (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
 get deltas between (best) segment and track If no chamber or no segment returns 999999
float dY (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
virtual TrackRef globalTrack () const
 reference to Track reconstructed in both tracked and muon detector
virtual TrackRef innerTrack () const
 ====================== TRACK BLOCK ===========================
bool isCaloCompatibilityValid () const
bool isCaloMuon () const
bool isEnergyValid () const
 ====================== ENERGY BLOCK ===========================
bool isGlobalMuon () const
bool isGood (SelectionType type=AllArbitrated) const
bool isIsolationValid () const
bool isMatchesValid () const
 ====================== MUON MATCH BLOCK ===========================
bool isMuon () const
const MuonIsolationisolationR03 () const
 ====================== ISOLATION BLOCK ===========================
const MuonIsolationisolationR05 () const
bool isStandAloneMuon () const
bool isTimeValid () const
 ====================== TIMING BLOCK ===========================
bool isTrackerMuon () const
const std::vector
< MuonChamberMatch > & 
matches () const
std::vector< MuonChamberMatch > & matches ()
 get muon matching information
 Muon (Charge, const LorentzVector &, const Point &=Point(0, 0, 0))
 constructor from values
 Muon ()
int numberOfChambers () const
 ====================== USEFUL METHODs ===========================
int numberOfMatches (ArbitrationType type=SegmentArbitration) const
 get number of chambers with matched segments
int numberOfSegments (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) 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=SegmentArbitration, bool includeSegmentError=false) const
float pullDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration, bool includeSegmentError=false) const
float pullX (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration, bool includeSegmentError=false) const
float pullY (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration, bool includeSegmentError=false) const
float segmentCompatibility () const
float segmentDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentDxDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentDyDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentX (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
 get (best) segment information If no segment returns 999999
float segmentXErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentY (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float segmentYErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
void setCalEnergy (const MuonEnergy &calEnergy)
 set energy deposition information
void setCaloCompatibility (float input)
virtual void setCombined (const TrackRef &t) __attribute__((deprecated))
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) __attribute__((deprecated))
void setTime (const MuonTime &time)
 set timing information
virtual void setTrack (const TrackRef &t) __attribute__((deprecated))
void setType (unsigned int type)
virtual TrackRef standAloneMuon () const __attribute__((deprecated))
 reference to a stand-alone muon Track
unsigned int 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
unsigned int stationGapMaskPull (float sigmaCut=3.) const
 same as above for given number of sigmas
unsigned int stationMask (ArbitrationType type=SegmentArbitration) 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
float t0 (int n=0)
MuonTime time () const
 get timing information
virtual TrackRef track () const __attribute__((deprecated))
 reference to a Track
float trackDist (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackDistErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackDxDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackDxDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackDyDz (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackDyDzErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackEdgeX (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) 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
float trackEdgeY (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackX (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackXErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackY (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
float trackYErr (int station, int muonSubdetId, ArbitrationType type=SegmentArbitration) const
unsigned int type () const

Static Public Attributes

static const unsigned int CaloMuon = 1<<4
static const unsigned int GlobalMuon = 1<<1
 muon type - type of the algorithm that reconstructed this muon multiple algorithms can reconstruct the same muon
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=SegmentArbitration) 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
TrackRef combinedMuon_
 reference to Track reconstructed in both tracked and muon detector
bool energyValid_
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 standAloneMuon_
 reference to Track reconstructed in the muon detector only
MuonTime time_
 timing
bool timeValid_
TrackRef track_
 reference to Track reconstructed in the tracker only
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.47 2008/12/01 06:51:14 dmytro Exp

Definition at line 24 of file Muon.h.


Member Enumeration Documentation

enum reco::Muon::ArbitrationType

define arbitration schemes

Enumerator:
NoArbitration 
SegmentArbitration 
SegmentAndTrackArbitration 

Definition at line 129 of file Muon.h.

enum reco::Muon::SelectionType

====================== SELECTOR BLOCK ===========================

simple muon selection based on stored information inside the muon object

Enumerator:
All 
AllGlobalMuons 
AllStandAloneMuons 
AllTrackerMuons 
TrackerMuonArbitrated 
AllArbitrated 
GlobalMuonPromptTight 
TMLastStationLoose 
TMLastStationTight 
TM2DCompatibilityLoose 
TM2DCompatibilityTight 
TMOneStationLoose 
TMOneStationTight 
TMLastStationOptimizedLowPtLoose 
TMLastStationOptimizedLowPtTight 

Definition at line 108 of file Muon.h.

00108                        {
00109          All,                      // dummy options - always true
00110          AllGlobalMuons,           // checks isGlobalMuon flag
00111          AllStandAloneMuons,       // checks isStandAloneMuon flag
00112          AllTrackerMuons,          // checks isTrackerMuon flag
00113          TrackerMuonArbitrated,    // resolve ambiguity of sharing segments
00114          AllArbitrated,            // all muons with the tracker muon arbitrated
00115          GlobalMuonPromptTight,    // global muons with tighter fit requirements
00116          TMLastStationLoose,       // penetration depth loose selector
00117          TMLastStationTight,       // penetration depth tight selector
00118          TM2DCompatibilityLoose,   // likelihood based loose selector
00119          TM2DCompatibilityTight,   // likelihood based tight selector
00120          TMOneStationLoose,        // require one well matched segment
00121          TMOneStationTight,        // require one well matched segment
00122          TMLastStationOptimizedLowPtLoose, // combination of TMLastStation and TMOneStation
00123          TMLastStationOptimizedLowPtTight  // combination of TMLastStation and TMOneStation
00124     };


Constructor & Destructor Documentation

Muon::Muon (  ) 

Definition at line 17 of file Muon.cc.

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

Referenced by clone().

00017            {
00018    energyValid_  = false;
00019    timeValid_  = false;
00020    matchesValid_ = false;
00021    isolationValid_ = false;
00022    caloCompatibility_ = -9999.;
00023    type_ = 0;
00024 }

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

constructor from values

Definition at line 7 of file Muon.cc.

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

00007                                                                    :
00008   RecoCandidate( q, p4, vtx, -13 * q ) {
00009      energyValid_  = false;
00010      timeValid_  = false;
00011      matchesValid_ = false;
00012      isolationValid_ = false;
00013      caloCompatibility_ = -9999.;
00014      type_ = 0;
00015 }


Member Function Documentation

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

get energy deposition information

Definition at line 60 of file Muon.h.

References calEnergy_.

Referenced by MuonEnergyDepositAnalyzer::analyze(), MuonCaloCompatibility::evaluate(), and MuonIdProducer::produce().

00060 { return calEnergy_; }

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 89 of file Muon.h.

References caloCompatibility_.

Referenced by muon::caloCompatibility().

00089 { 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 265 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().

00266 {
00267    std::vector<const MuonChamberMatch*> chambers;
00268    for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00269          chamberMatch != muMatches_.end(); chamberMatch++)
00270       if(chamberMatch->station()==station && chamberMatch->detector()==muonSubdetId)
00271          chambers.push_back(&(*chamberMatch));
00272    return chambers;
00273 }

Muon * Muon::clone ( void   )  const [virtual]

create a clone

Reimplemented from reco::LeafCandidate.

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

Definition at line 37 of file Muon.cc.

References Muon().

00037                          {
00038   return new Muon( * this );
00039 }

TrackRef Muon::combinedMuon (  )  const [virtual]

reference to a stand-alone muon Track

Reimplemented from reco::RecoCandidate.

Definition at line 51 of file Muon.cc.

References combinedMuon_.

Referenced by MuonRecoAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), overlap(), helper::MuonCollectionStoreManager::processMuon(), muon::tevOptimized(), and muon::tevOptimizedOld().

00052 {
00053    return combinedMuon_;
00054 }

float Muon::dDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 326 of file Muon.cc.

References chambers(), and pair().

00327 {
00328    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00329    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00330    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00331    return chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ;
00332 }

float Muon::dDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 334 of file Muon.cc.

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

00335 {
00336    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00337    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00338    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00339    if(! chamberSegmentPair.second->hasZed()) return 999999;
00340    return chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ;
00341 }

float Muon::dX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

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

Definition at line 309 of file Muon.cc.

References chambers(), and pair().

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

00310 {
00311    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00312    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00313    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00314    return chamberSegmentPair.first->x-chamberSegmentPair.second->x;
00315 }

float Muon::dY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 317 of file Muon.cc.

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

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

00318 {
00319    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00320    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00321    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00322    if(! chamberSegmentPair.second->hasZed()) return 999999;
00323    return chamberSegmentPair.first->y-chamberSegmentPair.second->y;
00324 }

virtual TrackRef reco::Muon::globalTrack (  )  const [inline, virtual]

reference to Track reconstructed in both tracked and muon detector

Definition at line 42 of file Muon.h.

References combinedMuon_.

Referenced by MuonEnergyDepositAnalyzer::analyze(), pat::Muon::combinedMuon(), pat::Muon::embedCombinedMuon(), muon::isGoodMuon(), and helper::MuonCollectionStoreManager::processMuon().

00042 { return combinedMuon_; }

virtual TrackRef reco::Muon::innerTrack (  )  const [inline, virtual]

====================== TRACK BLOCK ===========================

reference to Track reconstructed in the tracker only

Definition at line 36 of file Muon.h.

References track_.

Referenced by MuonEnergyDepositAnalyzer::analyze(), pat::Muon::embedTrack(), helper::MuonCollectionStoreManager::processMuon(), MuonIdProducer::produce(), and pat::Muon::track().

00036 { return track_; }

bool reco::Muon::isCaloCompatibilityValid (  )  const [inline]

Definition at line 91 of file Muon.h.

References caloCompatibility_.

00091 { return caloCompatibility_>=0; } 

bool reco::Muon::isCaloMuon (  )  const [inline, virtual]

Reimplemented from reco::Candidate.

Definition at line 162 of file Muon.h.

References type_.

Referenced by MuonRecoAnalyzer::analyze().

00162 { return type_ & CaloMuon; }

bool reco::Muon::isEnergyValid (  )  const [inline]

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

energy deposition

Definition at line 58 of file Muon.h.

References energyValid_.

Referenced by MuonIdProducer::produce().

00058 { return energyValid_; }

bool reco::Muon::isGlobalMuon (  )  const [inline, virtual]

Reimplemented from reco::Candidate.

Definition at line 159 of file Muon.h.

References GlobalMuon, and type_.

Referenced by MuonRecoAnalyzer::analyze(), MuonEnergyDepositAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), and muon::isGoodMuon().

00159 { return type_ & GlobalMuon; }

bool Muon::isGood ( SelectionType  type = AllArbitrated  )  const

Definition at line 713 of file Muon.cc.

References muon::isGoodMuon().

00714 {
00715    return muon::isGoodMuon( *this, type );
00716 }

bool reco::Muon::isIsolationValid (  )  const [inline]

Definition at line 101 of file Muon.h.

References isolationValid_.

00101 { return isolationValid_; }

bool reco::Muon::isMatchesValid (  )  const [inline]

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

Definition at line 77 of file Muon.h.

References matchesValid_.

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

00077 { return matchesValid_; }

bool reco::Muon::isMuon (  )  const [inline, virtual]

Reimplemented from reco::Candidate.

Definition at line 158 of file Muon.h.

00158 { return true; }

const MuonIsolation& reco::Muon::isolationR03 (  )  const [inline]

====================== ISOLATION BLOCK ===========================

Summary of muon isolation information

Definition at line 98 of file Muon.h.

References isolationR03_.

00098 { return isolationR03_; }

const MuonIsolation& reco::Muon::isolationR05 (  )  const [inline]

Definition at line 99 of file Muon.h.

References isolationR05_.

00099 { return isolationR05_; }

bool reco::Muon::isStandAloneMuon (  )  const [inline, virtual]

Reimplemented from reco::Candidate.

Definition at line 161 of file Muon.h.

References StandAloneMuon, and type_.

Referenced by MuonRecoAnalyzer::analyze(), MuonEnergyDepositAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), muon::isGoodMuon(), and MuonIdProducer::phiOfMuonIneteractionRegion().

00161 { return type_ & StandAloneMuon; }

bool reco::Muon::isTimeValid (  )  const [inline]

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

timing information

Definition at line 68 of file Muon.h.

References timeValid_.

Referenced by MuonIdProducer::produce().

00068 { return timeValid_; }

bool reco::Muon::isTrackerMuon (  )  const [inline, virtual]

Reimplemented from reco::Candidate.

Definition at line 160 of file Muon.h.

References TrackerMuon, and type_.

Referenced by MuonRecoAnalyzer::analyze(), MuonEnergyDepositAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), and muon::isGoodMuon().

00160 { return type_ & TrackerMuon; }

const std::vector<MuonChamberMatch>& reco::Muon::matches (  )  const [inline]

Definition at line 80 of file Muon.h.

References muMatches_.

00080 { return muMatches_;    }

std::vector<MuonChamberMatch>& reco::Muon::matches (  )  [inline]

get muon matching information

Definition at line 79 of file Muon.h.

References muMatches_.

Referenced by MuonIdProducer::fillMuonId(), MuonIdProducer::fillTime(), numberOfMatches(), MuonIdProducer::overlap(), MuonIdProducer::phiOfMuonIneteractionRegion(), MuonIdProducer::produce(), and MuonIdTruthInfo::truthMatchMuon().

00079 { return muMatches_;}

int reco::Muon::numberOfChambers (  )  const [inline]

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

number of chambers

Definition at line 135 of file Muon.h.

References muMatches_.

00135 { return muMatches_.size(); }

int Muon::numberOfMatches ( ArbitrationType  type = SegmentArbitration  )  const

get number of chambers with matched segments

Definition at line 71 of file Muon.cc.

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

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

00072 {
00073    int matches(0);
00074    for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00075          chamberMatch != muMatches_.end(); chamberMatch++ )
00076    {
00077       if(chamberMatch->segmentMatches.empty()) continue;
00078       if(type == NoArbitration) {
00079          matches++;
00080          continue;
00081       }
00082 
00083       for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
00084             segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
00085       {
00086          if(type == SegmentArbitration)
00087             if(segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
00088                matches++;
00089                break;
00090             }
00091          if(type == SegmentAndTrackArbitration)
00092             if(segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR) &&
00093                   segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
00094                matches++;
00095                break;
00096             }
00097          if(type > 1<<7)
00098             if(segmentMatch->isMask(type)) {
00099                matches++;
00100                break;
00101             }
00102       }
00103    }
00104 
00105    return matches;
00106 }

int Muon::numberOfSegments ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

get number of segments

Definition at line 226 of file Muon.cc.

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

00227 {
00228    int segments(0);
00229    for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00230          chamberMatch != muMatches_.end(); chamberMatch++ )
00231    {
00232       if(chamberMatch->segmentMatches.empty()) continue;
00233       if(!(chamberMatch->station()==station && chamberMatch->detector()==muonSubdetId)) continue;
00234 
00235       if(type == NoArbitration) {
00236          segments += chamberMatch->segmentMatches.size();
00237          continue;
00238       }
00239 
00240       for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
00241             segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
00242       {
00243          if(type == SegmentArbitration)
00244             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) {
00245                segments++;
00246                break;
00247             }
00248          if(type == SegmentAndTrackArbitration)
00249             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
00250                   segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
00251                segments++;
00252                break;
00253             }
00254          if(type > 1<<7)
00255             if(segmentMatch->isMask(type)) {
00256                segments++;
00257                break;
00258             }
00259       }
00260    }
00261 
00262    return segments;
00263 }

virtual TrackRef reco::Muon::outerTrack (  )  const [inline, virtual]

reference to Track reconstructed in the muon detector only

Definition at line 39 of file Muon.h.

References standAloneMuon_.

Referenced by MuonEnergyDepositAnalyzer::analyze(), pat::Muon::embedStandAloneMuon(), and pat::Muon::standAloneMuon().

00039 { return standAloneMuon_; }

bool Muon::overlap ( const Candidate c  )  const [private, virtual]

check overlap with another candidate

Implements reco::RecoCandidate.

Definition at line 26 of file Muon.cc.

References reco::RecoCandidate::checkOverlap(), reco::RecoCandidate::combinedMuon(), combinedMuon(), reco::RecoCandidate::standAloneMuon(), standAloneMuon(), reco::RecoCandidate::track(), and track().

00026                                               {
00027   const RecoCandidate * o = dynamic_cast<const RecoCandidate *>( & c );
00028   return ( o != 0 && 
00029            ( checkOverlap( track(), o->track() ) ||
00030              checkOverlap( standAloneMuon(), o->standAloneMuon() ) ||
00031              checkOverlap( combinedMuon(), o->combinedMuon() ) ||
00032              checkOverlap( standAloneMuon(), o->track() ) ||
00033              checkOverlap( combinedMuon(), o->track() ) )
00034            );
00035 }

std::pair< const MuonChamberMatch *, const MuonSegmentMatch * > Muon::pair ( const std::vector< const MuonChamberMatch * > &  chambers,
ArbitrationType  type = SegmentArbitration 
) const [private]

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

Definition at line 275 of file Muon.cc.

References reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInStationByDR, m, NoArbitration, s, SegmentAndTrackArbitration, 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().

00277 {
00278    MuonChamberMatch* m = 0;
00279    MuonSegmentMatch* s = 0;
00280    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair(m,s);
00281 
00282    if(chambers.empty()) return chamberSegmentPair;
00283    for( std::vector<const MuonChamberMatch*>::const_iterator chamberMatch = chambers.begin();
00284          chamberMatch != chambers.end(); chamberMatch++ )
00285    {
00286       if((*chamberMatch)->segmentMatches.empty()) continue;
00287       if(type == NoArbitration)
00288          return std::make_pair(*chamberMatch, &((*chamberMatch)->segmentMatches.front()));
00289 
00290       for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = (*chamberMatch)->segmentMatches.begin();
00291             segmentMatch != (*chamberMatch)->segmentMatches.end(); segmentMatch++ )
00292       {
00293          if(type == SegmentArbitration)
00294             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) 
00295                return std::make_pair(*chamberMatch, &(*segmentMatch));
00296          if(type == SegmentAndTrackArbitration)
00297             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
00298                   segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR))
00299                return std::make_pair(*chamberMatch, &(*segmentMatch));
00300          if(type > 1<<7)
00301             if(segmentMatch->isMask(type))
00302                return std::make_pair(*chamberMatch, &(*segmentMatch));
00303       }
00304    }
00305 
00306    return chamberSegmentPair;
00307 }

float Muon::pullDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration,
bool  includeSegmentError = false 
) const

Definition at line 364 of file Muon.cc.

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

00365 {
00366    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00367    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00368    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00369    if(includeSegmentError)
00370       return (chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ)/sqrt(pow(chamberSegmentPair.first->dXdZErr,2)+pow(chamberSegmentPair.second->dXdZErr,2));
00371    return (chamberSegmentPair.first->dXdZ-chamberSegmentPair.second->dXdZ)/chamberSegmentPair.first->dXdZErr;
00372 }

float Muon::pullDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration,
bool  includeSegmentError = false 
) const

Definition at line 374 of file Muon.cc.

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

00375 {
00376    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00377    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00378    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00379    if(! chamberSegmentPair.second->hasZed()) return 999999;
00380    if(includeSegmentError)
00381       return (chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ)/sqrt(pow(chamberSegmentPair.first->dYdZErr,2)+pow(chamberSegmentPair.second->dYdZErr,2));
00382    return (chamberSegmentPair.first->dYdZ-chamberSegmentPair.second->dYdZ)/chamberSegmentPair.first->dYdZErr;
00383 }

float Muon::pullX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration,
bool  includeSegmentError = false 
) const

Definition at line 343 of file Muon.cc.

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

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

00344 {
00345    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00346    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00347    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00348    if(includeSegmentError)
00349       return (chamberSegmentPair.first->x-chamberSegmentPair.second->x)/sqrt(pow(chamberSegmentPair.first->xErr,2)+pow(chamberSegmentPair.second->xErr,2));
00350    return (chamberSegmentPair.first->x-chamberSegmentPair.second->x)/chamberSegmentPair.first->xErr;
00351 }

float Muon::pullY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration,
bool  includeSegmentError = false 
) const

Definition at line 353 of file Muon.cc.

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

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

00354 {
00355    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00356    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00357    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00358    if(! chamberSegmentPair.second->hasZed()) return 999999;
00359    if(includeSegmentError)
00360       return (chamberSegmentPair.first->y-chamberSegmentPair.second->y)/sqrt(pow(chamberSegmentPair.first->yErr,2)+pow(chamberSegmentPair.second->yErr,2));
00361    return (chamberSegmentPair.first->y-chamberSegmentPair.second->y)/chamberSegmentPair.first->yErr;
00362 }

float Muon::segmentCompatibility (  )  const

Definition at line 708 of file Muon.cc.

References muon::segmentCompatibility().

00709 {
00710    return muon::segmentCompatibility( *this );
00711 }

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

Definition at line 402 of file Muon.cc.

References chambers(), and pair().

00403 {
00404    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00405    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00406    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00407    return chamberSegmentPair.second->dXdZ;
00408 }

float Muon::segmentDxDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 436 of file Muon.cc.

References chambers(), and pair().

00437 {
00438    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00439    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00440    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00441    return chamberSegmentPair.second->dXdZErr;
00442 }

float Muon::segmentDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 410 of file Muon.cc.

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

00411 {
00412    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00413    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00414    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00415    if(! chamberSegmentPair.second->hasZed()) return 999999;
00416    return chamberSegmentPair.second->dYdZ;
00417 }

float Muon::segmentDyDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 444 of file Muon.cc.

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

00445 {
00446    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00447    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00448    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00449    if(! chamberSegmentPair.second->hasZed()) return 999999;
00450    return chamberSegmentPair.second->dYdZErr;
00451 }

float Muon::segmentX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

get (best) segment information If no segment returns 999999

Definition at line 385 of file Muon.cc.

References chambers(), and pair().

Referenced by muon::segmentCompatibility().

00386 {
00387    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00388    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00389    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00390    return chamberSegmentPair.second->x;
00391 }

float Muon::segmentXErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 419 of file Muon.cc.

References chambers(), and pair().

00420 {
00421    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00422    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00423    if(! chamberSegmentPair.second->hasPhi()) return 999999;
00424    return chamberSegmentPair.second->xErr;
00425 }

float Muon::segmentY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 393 of file Muon.cc.

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

00394 {
00395    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00396    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00397    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00398    if(! chamberSegmentPair.second->hasZed()) return 999999;
00399    return chamberSegmentPair.second->y;
00400 }

float Muon::segmentYErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 427 of file Muon.cc.

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

00428 {
00429    if(station==4 && muonSubdetId==MuonSubdetId::DT) return 999999; // no y information
00430    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(chambers(station,muonSubdetId),type);
00431    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) return 999999;
00432    if(! chamberSegmentPair.second->hasZed()) return 999999;
00433    return chamberSegmentPair.second->yErr;
00434 }

void reco::Muon::setCalEnergy ( const MuonEnergy calEnergy  )  [inline]

set energy deposition information

Definition at line 62 of file Muon.h.

References calEnergy_, and energyValid_.

Referenced by MuonIdProducer::fillMuonId().

00062 { calEnergy_ = calEnergy; energyValid_ = true; }

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

Definition at line 90 of file Muon.h.

References caloCompatibility_.

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

Definition at line 66 of file Muon.cc.

References combinedMuon_.

Referenced by MuonProducer::produce().

00067 {
00068    combinedMuon_ = t; 
00069 }

virtual void reco::Muon::setGlobalTrack ( const TrackRef t  )  [inline, virtual]

set reference to Track

Definition at line 51 of file Muon.h.

References combinedMuon_.

Referenced by MuonIdProducer::makeMuon().

00051 { combinedMuon_ = t; }

virtual void reco::Muon::setInnerTrack ( const TrackRef t  )  [inline, virtual]

set reference to Track

Definition at line 45 of file Muon.h.

References track_.

Referenced by MuonIdProducer::makeMuon(), and ParamL3MuonProducer::produce().

00045 { track_ = t; }

void Muon::setIsolation ( const MuonIsolation isoR03,
const MuonIsolation isoR05 
)

Definition at line 701 of file Muon.cc.

References isolationR03_, isolationR05_, and isolationValid_.

Referenced by MuonIdProducer::fillMuonIsolation().

00702 { 
00703    isolationR03_ = isoR03;
00704    isolationR05_ = isoR05;
00705    isolationValid_ = true; 
00706 }

void reco::Muon::setMatches ( const std::vector< MuonChamberMatch > &  matches  )  [inline]

set muon matching information

Definition at line 82 of file Muon.h.

References matchesValid_, and muMatches_.

Referenced by MuonIdProducer::fillMuonId().

00082 { muMatches_ = matches; matchesValid_ = true; }

virtual void reco::Muon::setOuterTrack ( const TrackRef t  )  [inline, virtual]

set reference to Track

Definition at line 48 of file Muon.h.

References standAloneMuon_.

Referenced by MuonIdProducer::makeMuon().

00048 { standAloneMuon_ = t; }

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

Definition at line 61 of file Muon.cc.

References standAloneMuon_.

Referenced by MuonProducer::produce().

00062 {
00063    standAloneMuon_ = t; 
00064 }

void reco::Muon::setTime ( const MuonTime time  )  [inline]

set timing information

Definition at line 72 of file Muon.h.

References time_, and timeValid_.

Referenced by MuonIdProducer::fillTime().

00072 { time_ = time; timeValid_ = true; }

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

Definition at line 56 of file Muon.cc.

References track_.

Referenced by MuonProducer::produce().

00057 {
00058     track_ = t; 
00059 }

void reco::Muon::setType ( unsigned int  type  )  [inline]

Definition at line 155 of file Muon.h.

References type_.

Referenced by MuonIdProducer::produce().

00155 { type_ = type; }

TrackRef Muon::standAloneMuon (  )  const [virtual]

reference to a stand-alone muon Track

Reimplemented from reco::RecoCandidate.

Definition at line 46 of file Muon.cc.

References standAloneMuon_.

Referenced by MuonRecoAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), MuonCaloCompatibility::evaluate(), MuonIdProducer::fillMuonId(), MuonIdProducer::fillMuonIsolation(), overlap(), MuonIdProducer::phiOfMuonIneteractionRegion(), and helper::MuonCollectionStoreManager::processMuon().

00047 {
00048    return standAloneMuon_; 
00049 }

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

References muMatches_.

00159 {
00160    unsigned int totMask(0);
00161    for( int stationIndex = 1; stationIndex < 5; stationIndex++ )
00162    {
00163       for( int detectorIndex = 1; detectorIndex < 4; detectorIndex++ )
00164       {
00165          unsigned int curMask(0);
00166          for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00167                chamberMatch != muMatches_.end(); chamberMatch++ )
00168          {
00169             if(!(chamberMatch->station()==stationIndex && chamberMatch->detector()==detectorIndex)) continue;
00170 
00171             float edgeX = chamberMatch->edgeX;
00172             float edgeY = chamberMatch->edgeY;
00173             if(edgeX<0 && fabs(edgeX)>fabs(distanceCut) &&
00174                   edgeY<0 && fabs(edgeY)>fabs(distanceCut)) // inside the chamber so negates all gaps for this station
00175             {
00176                curMask = 0;
00177                break;
00178             }
00179             if( ( fabs(edgeX) < fabs(distanceCut) && edgeY < fabs(distanceCut) ) ||
00180                 ( fabs(edgeY) < fabs(distanceCut) && edgeX < fabs(distanceCut) ) ) // inside gap
00181                curMask = 1<<(stationIndex-1)+4*(detectorIndex-1);
00182          }
00183 
00184          totMask += curMask; // add to total mask
00185       }
00186    }
00187 
00188    return totMask;
00189 }

unsigned int Muon::stationGapMaskPull ( float  sigmaCut = 3.  )  const

same as above for given number of sigmas

Definition at line 191 of file Muon.cc.

References muMatches_.

00192 {
00193    unsigned int totMask(0);
00194    for( int stationIndex = 1; stationIndex < 5; stationIndex++ )
00195    {
00196       for( int detectorIndex = 1; detectorIndex < 4; detectorIndex++ )
00197       {
00198          unsigned int curMask(0);
00199          for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00200                chamberMatch != muMatches_.end(); chamberMatch++ )
00201          {
00202             if(!(chamberMatch->station()==stationIndex && chamberMatch->detector()==detectorIndex)) continue;
00203 
00204             float edgeX = chamberMatch->edgeX;
00205             float edgeY = chamberMatch->edgeY;
00206             float xErr  = chamberMatch->xErr+0.000001; // protect against division by zero later
00207             float yErr  = chamberMatch->yErr+0.000001; // protect against division by zero later
00208             if(edgeX<0 && fabs(edgeX/xErr)>fabs(sigmaCut) &&
00209                   edgeY<0 && fabs(edgeY/yErr)>fabs(sigmaCut)) // inside the chamber so negates all gaps for this station
00210             {
00211                curMask = 0;
00212                break;
00213             }
00214             if( ( fabs(edgeX/xErr) < fabs(sigmaCut) && edgeY/yErr < fabs(sigmaCut) ) ||
00215                 ( fabs(edgeY/yErr) < fabs(sigmaCut) && edgeX/xErr < fabs(sigmaCut) ) ) // inside gap
00216                curMask = 1<<(stationIndex-1)+4*(detectorIndex-1);
00217          }
00218 
00219          totMask += curMask; // add to total mask
00220       }
00221    }
00222 
00223    return totMask;
00224 }

unsigned int Muon::stationMask ( ArbitrationType  type = SegmentArbitration  )  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 108 of file Muon.cc.

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

Referenced by muon::isGoodMuon().

00109 {
00110    unsigned int totMask(0);
00111    unsigned int curMask(0);
00112    for( std::vector<MuonChamberMatch>::const_iterator chamberMatch = muMatches_.begin();
00113          chamberMatch != muMatches_.end(); chamberMatch++ )
00114    {
00115       if(chamberMatch->segmentMatches.empty()) continue;
00116       if(type == NoArbitration) {
00117          curMask = 1<<(chamberMatch->station()-1)+4*(chamberMatch->detector()-1);
00118          // do not double count
00119          if(!(totMask & curMask))
00120             totMask += curMask;
00121          continue;
00122       }
00123 
00124       for( std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
00125             segmentMatch != chamberMatch->segmentMatches.end(); segmentMatch++ )
00126       {
00127          if(type == SegmentArbitration)
00128             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR)) {
00129                curMask = 1<<(chamberMatch->station()-1)+4*(chamberMatch->detector()-1);
00130                // do not double count
00131                if(!(totMask & curMask))
00132                   totMask += curMask;
00133                break;
00134             }
00135          if(type == SegmentAndTrackArbitration)
00136             if(segmentMatch->isMask(MuonSegmentMatch::BestInStationByDR) &&
00137                   segmentMatch->isMask(MuonSegmentMatch::BelongsToTrackByDR)) {
00138                curMask = 1<<(chamberMatch->station()-1)+4*(chamberMatch->detector()-1);
00139                // do not double count
00140                if(!(totMask & curMask))
00141                   totMask += curMask;
00142                break;
00143             }
00144          if(type > 1<<7)
00145             if(segmentMatch->isMask(type)) {
00146                curMask = 1<<(chamberMatch->station()-1)+4*(chamberMatch->detector()-1);
00147                // do not double count
00148                if(!(totMask & curMask))
00149                   totMask += curMask;
00150                break;
00151             }
00152       }
00153    }
00154 
00155    return totMask;
00156 }

float reco::Muon::t0 ( int  n = 0  )  [inline]

Definition at line 240 of file Muon.h.

References i, muMatches_, and n.

00240                        {
00241         int i = 0;
00242         for( std::vector<MuonChamberMatch>::const_iterator chamber = muMatches_.begin();
00243              chamber != muMatches_.end(); ++chamber )
00244           for ( std::vector<reco::MuonSegmentMatch>::const_iterator segment = chamber->segmentMatches.begin();
00245                 segment != chamber->segmentMatches.end(); ++segment )
00246             {
00247                if (i==n) return segment->t0;
00248                ++i;
00249             }
00250         return 0;
00251      }

MuonTime reco::Muon::time (  )  const [inline]

get timing information

Definition at line 70 of file Muon.h.

References time_.

Referenced by MuonIdProducer::produce().

00070 { return time_; }

TrackRef Muon::track ( void   )  const [virtual]

reference to a Track

Reimplemented from reco::RecoCandidate.

Definition at line 41 of file Muon.cc.

References track_.

Referenced by MuonRecoAnalyzer::analyze(), AlignmentMuonSelector::basicCuts(), MuonCaloCompatibility::evaluate(), MuonIdProducer::fillMuonId(), MuonIdProducer::fillMuonIsolation(), overlap(), helper::MuonCollectionStoreManager::processMuon(), muon::tevOptimized(), muon::tevOptimizedOld(), and MuonIdTruthInfo::truthMatchMuon().

00042 { 
00043    return track_; 
00044 }

float Muon::trackDist ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 663 of file Muon.cc.

References chambers(), dist(), and pair().

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

00664 {
00665    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00666    if(muonChambers.empty()) return 999999;
00667 
00668    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00669    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00670       float dist  = 999999;
00671       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00672             muonChamber != muonChambers.end(); ++muonChamber) {
00673          float currDist = (*muonChamber)->dist();
00674          if(currDist<dist) dist  = currDist;
00675       }
00676       return dist;
00677    } else return chamberSegmentPair.first->dist();
00678 }

float Muon::trackDistErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 680 of file Muon.cc.

References chambers(), dist(), and pair().

Referenced by muon::RequiredStationMask().

00681 {
00682    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00683    if(muonChambers.empty()) return 999999;
00684 
00685    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00686    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00687       float dist  = 999999;
00688       float supVar = 999999;
00689       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00690             muonChamber != muonChambers.end(); ++muonChamber) {
00691          float currDist = (*muonChamber)->dist();
00692          if(currDist<dist) {
00693             dist  = currDist;
00694             supVar = (*muonChamber)->distErr();
00695          }
00696       }
00697       return supVar;
00698    } else return chamberSegmentPair.first->distErr();
00699 }

float Muon::trackDxDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 537 of file Muon.cc.

References chambers(), dist(), and pair().

00538 {
00539    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00540    if(muonChambers.empty()) return 999999;
00541 
00542    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00543    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00544       float dist  = 999999;
00545       float supVar = 999999;
00546       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00547             muonChamber != muonChambers.end(); ++muonChamber) {
00548          float currDist = (*muonChamber)->dist();
00549          if(currDist<dist) {
00550             dist  = currDist;
00551             supVar = (*muonChamber)->dXdZ;
00552          }
00553       }
00554       return supVar;
00555    } else return chamberSegmentPair.first->dXdZ;
00556 }

float Muon::trackDxDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 621 of file Muon.cc.

References chambers(), dist(), and pair().

00622 {
00623    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00624    if(muonChambers.empty()) return 999999;
00625 
00626    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00627    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00628       float dist  = 999999;
00629       float supVar = 999999;
00630       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00631             muonChamber != muonChambers.end(); ++muonChamber) {
00632          float currDist = (*muonChamber)->dist();
00633          if(currDist<dist) {
00634             dist  = currDist;
00635             supVar = (*muonChamber)->dXdZErr;
00636          }
00637       }
00638       return supVar;
00639    } else return chamberSegmentPair.first->dXdZErr;
00640 }

float Muon::trackDyDz ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 558 of file Muon.cc.

References chambers(), dist(), and pair().

00559 {
00560    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00561    if(muonChambers.empty()) return 999999;
00562 
00563    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00564    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00565       float dist  = 999999;
00566       float supVar = 999999;
00567       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00568             muonChamber != muonChambers.end(); ++muonChamber) {
00569          float currDist = (*muonChamber)->dist();
00570          if(currDist<dist) {
00571             dist  = currDist;
00572             supVar = (*muonChamber)->dYdZ;
00573          }
00574       }
00575       return supVar;
00576    } else return chamberSegmentPair.first->dYdZ;
00577 }

float Muon::trackDyDzErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 642 of file Muon.cc.

References chambers(), dist(), and pair().

00643 {
00644    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00645    if(muonChambers.empty()) return 999999;
00646 
00647    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00648    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00649       float dist  = 999999;
00650       float supVar = 999999;
00651       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00652             muonChamber != muonChambers.end(); ++muonChamber) {
00653          float currDist = (*muonChamber)->dist();
00654          if(currDist<dist) {
00655             dist  = currDist;
00656             supVar = (*muonChamber)->dYdZErr;
00657          }
00658       }
00659       return supVar;
00660    } else return chamberSegmentPair.first->dYdZErr;
00661 }

float Muon::trackEdgeX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) 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 453 of file Muon.cc.

References chambers(), dist(), and pair().

00454 {
00455    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00456    if(muonChambers.empty()) return 999999;
00457 
00458    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00459    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00460       float dist  = 999999;
00461       float supVar = 999999;
00462       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00463             muonChamber != muonChambers.end(); ++muonChamber) {
00464          float currDist = (*muonChamber)->dist();
00465          if(currDist<dist) {
00466             dist  = currDist;
00467             supVar = (*muonChamber)->edgeX;
00468          }
00469       }
00470       return supVar;
00471    } else return chamberSegmentPair.first->edgeX;
00472 }

float Muon::trackEdgeY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 474 of file Muon.cc.

References chambers(), dist(), and pair().

00475 {
00476    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00477    if(muonChambers.empty()) return 999999;
00478 
00479    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00480    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00481       float dist  = 999999;
00482       float supVar = 999999;
00483       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00484             muonChamber != muonChambers.end(); ++muonChamber) {
00485          float currDist = (*muonChamber)->dist();
00486          if(currDist<dist) {
00487             dist  = currDist;
00488             supVar = (*muonChamber)->edgeY;
00489          }
00490       }
00491       return supVar;
00492    } else return chamberSegmentPair.first->edgeY;
00493 }

float Muon::trackX ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 495 of file Muon.cc.

References chambers(), dist(), and pair().

00496 {
00497    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00498    if(muonChambers.empty()) return 999999;
00499 
00500    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00501    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00502       float dist  = 999999;
00503       float supVar = 999999;
00504       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00505             muonChamber != muonChambers.end(); ++muonChamber) {
00506          float currDist = (*muonChamber)->dist();
00507          if(currDist<dist) {
00508             dist  = currDist;
00509             supVar = (*muonChamber)->x;
00510          }
00511       }
00512       return supVar;
00513    } else return chamberSegmentPair.first->x;
00514 }

float Muon::trackXErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 579 of file Muon.cc.

References chambers(), dist(), and pair().

00580 {
00581    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00582    if(muonChambers.empty()) return 999999;
00583 
00584    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00585    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00586       float dist  = 999999;
00587       float supVar = 999999;
00588       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00589             muonChamber != muonChambers.end(); ++muonChamber) {
00590          float currDist = (*muonChamber)->dist();
00591          if(currDist<dist) {
00592             dist  = currDist;
00593             supVar = (*muonChamber)->xErr;
00594          }
00595       }
00596       return supVar;
00597    } else return chamberSegmentPair.first->xErr;
00598 }

float Muon::trackY ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 516 of file Muon.cc.

References chambers(), dist(), and pair().

00517 {
00518    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00519    if(muonChambers.empty()) return 999999;
00520 
00521    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00522    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00523       float dist  = 999999;
00524       float supVar = 999999;
00525       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00526             muonChamber != muonChambers.end(); ++muonChamber) {
00527          float currDist = (*muonChamber)->dist();
00528          if(currDist<dist) {
00529             dist  = currDist;
00530             supVar = (*muonChamber)->y;
00531          }
00532       }
00533       return supVar;
00534    } else return chamberSegmentPair.first->y;
00535 }

float Muon::trackYErr ( int  station,
int  muonSubdetId,
ArbitrationType  type = SegmentArbitration 
) const

Definition at line 600 of file Muon.cc.

References chambers(), dist(), and pair().

00601 {
00602    const std::vector<const MuonChamberMatch*> muonChambers = chambers(station, muonSubdetId);
00603    if(muonChambers.empty()) return 999999;
00604 
00605    std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> chamberSegmentPair = pair(muonChambers,type);
00606    if(chamberSegmentPair.first==0 || chamberSegmentPair.second==0) {
00607       float dist  = 999999;
00608       float supVar = 999999;
00609       for(std::vector<const MuonChamberMatch*>::const_iterator muonChamber = muonChambers.begin();
00610             muonChamber != muonChambers.end(); ++muonChamber) {
00611          float currDist = (*muonChamber)->dist();
00612          if(currDist<dist) {
00613             dist  = currDist;
00614             supVar = (*muonChamber)->yErr;
00615          }
00616       }
00617       return supVar;
00618    } else return chamberSegmentPair.first->yErr;
00619 }

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

Definition at line 156 of file Muon.h.

References type_.

00156 { return type_; }


Member Data Documentation

MuonEnergy reco::Muon::calEnergy_ [private]

energy deposition

Definition at line 174 of file Muon.h.

Referenced by calEnergy(), and setCalEnergy().

float reco::Muon::caloCompatibility_ [private]

muon hypothesis compatibility with observer calorimeter energy

Definition at line 185 of file Muon.h.

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

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

Definition at line 154 of file Muon.h.

TrackRef reco::Muon::combinedMuon_ [private]

reference to Track reconstructed in both tracked and muon detector

Definition at line 172 of file Muon.h.

Referenced by combinedMuon(), globalTrack(), setCombined(), and setGlobalTrack().

bool reco::Muon::energyValid_ [private]

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

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

MuonIsolation reco::Muon::isolationR03_ [private]

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

Definition at line 187 of file Muon.h.

Referenced by isolationR03(), and setIsolation().

MuonIsolation reco::Muon::isolationR05_ [private]

Definition at line 188 of file Muon.h.

Referenced by isolationR05(), and setIsolation().

bool reco::Muon::isolationValid_ [private]

Definition at line 183 of file Muon.h.

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

bool reco::Muon::matchesValid_ [private]

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

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

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

Definition at line 153 of file Muon.h.

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

TrackRef reco::Muon::standAloneMuon_ [private]

reference to Track reconstructed in the muon detector only

Definition at line 170 of file Muon.h.

Referenced by outerTrack(), setOuterTrack(), setStandAlone(), and standAloneMuon().

MuonTime reco::Muon::time_ [private]

timing

Definition at line 178 of file Muon.h.

Referenced by setTime(), and time().

bool reco::Muon::timeValid_ [private]

Definition at line 181 of file Muon.h.

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

TrackRef reco::Muon::track_ [private]

reference to Track reconstructed in the tracker only

Definition at line 168 of file Muon.h.

Referenced by innerTrack(), setInnerTrack(), setTrack(), and track().

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

Definition at line 152 of file Muon.h.

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

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

muon type mask

Definition at line 190 of file Muon.h.

Referenced by isCaloMuon(), isGlobalMuon(), isStandAloneMuon(), isTrackerMuon(), Muon(), setType(), and type().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:17 2009 for CMSSW by  doxygen 1.5.4