CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
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().

4  {
5  // check is done in 2D
6  return (track.innerPosition().x() - track.vx()) * track.px() + (track.innerPosition().y() - track.vy()) * track.py() >
7  0;
8 }
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655