Belle II Software development
Point2D.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include "trg/trg/Point2D.h"
10
11namespace Belle2 {
18 {
19 _p[0] = 0.;
20 _p[1] = 0.;
21 }
22
23 TRGPoint2D::TRGPoint2D(double x, double y)
24 {
25 _p[0] = x;
26 _p[1] = y;
27 }
28
30 {
31 _p[0] = a.x();
32 _p[1] = a.y();
33 }
34
35 TRGPoint2D::TRGPoint2D(const HepGeom::Vector3D<double>& a)
36 {
37 _p[0] = a.x();
38 _p[1] = a.y();
39 }
40
41 TRGPoint2D::TRGPoint2D(const CLHEP::Hep3Vector& a)
42 {
43 _p[0] = a.x();
44 _p[1] = a.y();
45 }
46
48 {
49 }
50
51 std::ostream&
52 operator << (std::ostream& s, const TRGPoint2D& a)
53 {
54 return s << "(" << a.x() << "," << a.y() << ")";
55 }
56
58} // namespace Belle2
59
A class to represent a point in 2D.
Definition: Point2D.h:27
double _p[2]
vector
Definition: Point2D.h:81
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
TRGPoint2D()
Constructor.
Definition: Point2D.cc:17
double y(void) const
y of the point
Definition: Point2D.h:99
double x(void) const
x of the point
Definition: Point2D.h:92
virtual ~TRGPoint2D()
Destructor.
Definition: Point2D.cc:47
Abstract base class for different kinds of events.