#ifndef SPHERICALCOORDINATE_HH #define SPHERICALCOORDINATE_HH // // $Id: SphericalCoordinate.hpp,v 1.6 1998/10/16 02:57:52 hobbs Exp $ // // File: SphericalCoordinate.hh // Purpose: Represent a 3D point in spherical coordinates. Just a thin // shell around SphericalPoint // Created: 02-SEP-1997 John Hobbs // // $Revision: 1.6 $ // // // Include files #include #include namespace dgs { /** A SpacePoint in spherical coordinates. A spherical coordinate is specified by a radius $r$ (distance from the origin) and two angles, $\phi$ and $\theta$. The angle $\phi$ is measured in the $(x,y)$ plane, with $\phi = 0$ being the $x$ axis, and $\phi = \pi/2$ the $y$ axis. The angle $\theta$ is measured from the $z$ axis, with $\theta = 0$ being the $z$ axis. Access to the components of a spherical coordinate is through the member functions {\bf r()}, {\bf phi()} and {\bf theta()}. */ class SphericalCoordinate: public SphericalPoint { public: /// Default constructor. SphericalCoordinate(): SphericalPoint(0,0,0) {} /// Construct local point at r, phi, theta. SphericalCoordinate( double r, double phi, double theta): SphericalPoint(r,phi,theta) {} /// Copy constructor SphericalCoordinate(const SpacePoint& lpt): SphericalPoint(lpt.rxyz(),lpt.phi(),lpt.theta()) {} }; } #endif // SPHERICALCOORDINATE_HH