9 #ifndef DUNEANAOBJ_SRVECTOR3D_H
10 #define DUNEANAOBJ_SRVECTOR3D_H
12 #if !defined(__GCCXML__) && !defined(__castxml__)
31 #if !defined(__GCCXML__) && !defined(__castxml__)
38 void SetXYZ(
float x,
float y,
float z);
40 #if !defined(__GCCXML__) && !defined(__castxml__)
42 operator TVector3()
const;
45 void SetX(
float _x){x = _x;}
46 void SetY(
float _y){y = _y;}
47 void SetZ(
float _z){z = _z;}
49 float X()
const {
return x;}
50 float Y()
const {
return y;}
51 float Z()
const {
return z;}
56 float Mag2()
const {
return x*x+y*y+z*z;}
57 float Mag()
const {
return sqrt(Mag2());}
58 float Dot(
const SRVector3D& v)
const {
return x*v.x + y*v.y + z*v.z;}
61 const float m = Mag();
79 #if !defined(__GCCXML__) && !defined(__castxml__)
81 std::ostream & operator<<(std::ostream & stream,
const caf::SRVector3D & vec);
A 3-vector with more efficient storage than TVector3.
Definition: SRVector3D.h:26
Common Analysis Files.
Definition: SRBeamBranch.h:13