// Simple three-vector class // Glen Cowan, RHUL Physics Dept., 4 December 2001. #ifndef THREEVECTOR_H #define THREEVECTOR_H class ThreeVector { public: ThreeVector(); ThreeVector (float, float, float); float x(); float y(); float z(); void set(float, float, float); float r(); float cosTheta(); float theta(); float rho(); // sqrt (x^2 + y^2) float cosPhi(); float sinPhi(); float phi(); private: float xVal; float yVal; float zVal; }; float dotProd (ThreeVector, ThreeVector); #endif