Geometry/Vector Classes

aon_vector.h
aon_vector.cpp

WARNING 2005-03-16

I have discovered some sort of bug in the elliptical/geocentric coordinate transformations. Consider this code dangerous until it's fixed.

Class: Vector3D

This is a 3D vector class useful for all kinds of physics. It goes beyond the features of the ROOT vector classes in terms of it's usefulness to astrophysicists.

The class stores co-ordinates internally as cartesian (X,Y,Z). I use this as a geo-centric cartesian coordinate system with X pointing toward the Greenwich Meridian, Z pointing North.

The position vector is accessible in a number of different coordinate systems, each of which have separate get/set functions.

Coordinate Systems

RThetaPhi

This is the geocentric co-ordinate system as spherical polar coordinates, Theta being the angle from the Z-axis, Phi being the angle eastward from the Greenwich Meridian.

ENU

This is a "Local Cartesian" system: (East, North, Up) at a given latitude and longitude on the Earth's surface.

Ellipsoidal

This is a point in the atmosphere or ground described as latitude, longitude and height above the Ellipsoid (WGS84 Ellipsoid).

Topocentric Cartesian

This is the cartesian coordinates with respect to some origin (e.g. detector). Each origin has a unique (East, North, Up) system according to it's position. A point can be described by the origin and (E,N,U).

Topocentric Polar

Like the above system, a point can be described by (range, azimuth, zenith) from some origin (detector) on, say the earth's surface.

Overloaded Operators

Operators or functions are provided for vector addition, subtraction, scalar multiplication, output as (X, Y, Z), vector and scalar products.

Conversion Routines

gmf_geometry.h
gmf_geometry.cpp

These files contain functions to convert between the various co-ordinate systems described above. They are well commented and pretty self-explanatory.