CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/RecoMuon/MuonIdentification/src/MuonCosmicsId.cc File Reference

#include "RecoMuon/MuonIdentification/interface/MuonCosmicsId.h"
#include "DataFormats/TrackReco/interface/Track.h"

Go to the source code of this file.

Functions

bool directionAlongMomentum (const reco::Track &track)

Function Documentation

bool directionAlongMomentum ( const reco::Track track)

Definition at line 4 of file MuonCosmicsId.cc.

References reco::Track::innerPosition(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::vx(), and reco::TrackBase::vy().

Referenced by muonid::matchTracks().

                                                   {
  // check is done in 2D
  return (track.innerPosition().x()-track.vx())*track.px() +
    (track.innerPosition().y()-track.vy())*track.py() > 0;
}