CMS 3D CMS Logo

LineXY Class Reference

#include <RecoTracker/RoadSearchSeedFinder/interface/RoadSearchCircleSeed.h>

List of all members.

Public Member Functions

 LineXY (GlobalPoint point1, GlobalPoint point2)
double Phi () const
 ~LineXY ()

Private Attributes

double theX_
double theY_


Detailed Description

Definition at line 136 of file RoadSearchCircleSeed.h.


Constructor & Destructor Documentation

LineXY::LineXY ( GlobalPoint  point1,
GlobalPoint  point2 
)

Definition at line 470 of file RoadSearchCircleSeed.cc.

References PV3DBase< T, PVType, FrameType >::perp(), theX_, theY_, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

00471 {
00472   theX_ = std::fabs(point1.x()-point2.x()); 
00473   theY_ = std::fabs(point1.y()-point2.y());
00474   //If the line is pointing backwards in x
00475   if ((point1.perp() >= point2.perp() &&
00476        point1.x() < point2.x()) ||
00477       (point2.perp() >= point1.perp() &&
00478        point2.x() < point1.x()))
00479   {
00480     theX_ = -1.*theX_;
00481   }
00482   //If the line is pointing backwards in y
00483   if ((point1.perp() >= point2.perp() &&
00484        point1.y() < point2.y()) ||
00485       (point2.perp() >= point1.perp() &&
00486        point2.y() < point1.y()))
00487   {
00488     theY_ = -1.*theY_;
00489   }
00490 }

LineXY::~LineXY (  ) 

Definition at line 495 of file RoadSearchCircleSeed.cc.

00496 { }


Member Function Documentation

double LineXY::Phi (  )  const [inline]

Definition at line 141 of file RoadSearchCircleSeed.h.

References theX_, and theY_.

00141 { return atan2(theY_,theX_); }


Member Data Documentation

double LineXY::theX_ [private]

Definition at line 144 of file RoadSearchCircleSeed.h.

Referenced by LineXY(), and Phi().

double LineXY::theY_ [private]

Definition at line 145 of file RoadSearchCircleSeed.h.

Referenced by LineXY(), and Phi().


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