Belle II Software  release-05-01-25
Point2D.cc
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : TRGPoint2D.cc
5 // Section : TRG
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to represent a point in 2D.
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #include "trg/trg/Point2D.h"
15 
16 namespace Belle2 {
23  {
24  _p[0] = 0.;
25  _p[1] = 0.;
26  }
27 
28  TRGPoint2D::TRGPoint2D(double x, double y)
29  {
30  _p[0] = x;
31  _p[1] = y;
32  }
33 
35  {
36  _p[0] = a.x();
37  _p[1] = a.y();
38  }
39 
40  TRGPoint2D::TRGPoint2D(const HepGeom::Vector3D<double>& a)
41  {
42  _p[0] = a.x();
43  _p[1] = a.y();
44  }
45 
46  TRGPoint2D::TRGPoint2D(const CLHEP::Hep3Vector& a)
47  {
48  _p[0] = a.x();
49  _p[1] = a.y();
50  }
51 
53  {
54  }
55 
56  std::ostream&
57  operator << (std::ostream& s, const TRGPoint2D& a)
58  {
59  return s << "(" << a.x() << "," << a.y() << ")";
60  }
61 
63 } // namespace Belle2
64 
Belle2::operator<<
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Definition: IntervalOfValidity.cc:196
Belle2::TRGPoint2D
A class to represent a point in 2D.
Definition: Point2D.h:32
Belle2::TRGPoint2D::TRGPoint2D
TRGPoint2D()
Constructor.
Definition: Point2D.cc:22
Belle2::TRGPoint2D::y
double y(void) const
y of the point
Definition: Point2D.h:103
Belle2::TRGPoint2D::x
double x(void) const
x of the point
Definition: Point2D.h:96
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGPoint2D::~TRGPoint2D
virtual ~TRGPoint2D()
Destructor.
Definition: Point2D.cc:52
Belle2::TRGPoint2D::_p
double _p[2]
vector
Definition: Point2D.h:85
HepGeom::Point3D< double >