SRVector3D.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file SRLorentzVector.cxx
3 // \author Christopher Backhouse - c.backhouse@ucl.ac.uk
4 ////////////////////////////////////////////////////////////////////////
5 
7 
8 #include <cmath>
9 #include <limits>
10 
11 namespace caf
12 {
14  x(std::numeric_limits<float>::signaling_NaN()),
15  y(std::numeric_limits<float>::signaling_NaN()),
16  z(std::numeric_limits<float>::signaling_NaN())
17  {}
18 
19  SRVector3D::SRVector3D(float _x, float _y, float _z) :
20  x(_x), y(_y), z(_z)
21  {}
22 
23  SRVector3D::SRVector3D(const TVector3& v) :
24  x(v.X()), y(v.Y()), z(v.Z())
25  {}
26 
27  void SRVector3D::SetXYZ(float _x, float _y, float _z)
28  {
29  x = _x;
30  y = _y;
31  z = _z;
32  }
33 
34  SRVector3D::operator TVector3() const
35  {
36  return TVector3(x, y, z);
37  }
38 
39 }
40 
41 std::ostream &operator<<(std::ostream &stream, const caf::SRVector3D &vec)
42 {
43  stream << "(" << vec.x << "," << vec.y << "," << vec.z << ")";
44  return stream;
45 }
A 3-vector with more efficient storage than TVector3.
Definition: SRVector3D.h:25
void SetXYZ(float x, float y, float z)
Definition: SRVector3D.cxx:27
float Y() const
Definition: SRVector3D.h:49
STL namespace.
std::ostream & operator<<(std::ostream &stream, const caf::SRVector3D &vec)
Definition: SRVector3D.cxx:41
float X() const
Definition: SRVector3D.h:48
float Z() const
Definition: SRVector3D.h:50
list x
Definition: train.py:276
Common Analysis Files.
Definition: SRGAr.h:13