lcsim/src/org/lcsim/recon/vertexing/zvtop4
diff -N HepPoint.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ HepPoint.java 22 Aug 2005 16:09:29 -0000 1.1
@@ -0,0 +1,83 @@
+package org.lcsim.recon.vertexing.zvtop4;
+
+import static java.lang.Math.sqrt;
+
+/**
+ * Representation of a Point in 3D space.
+ * @author jstrube
+ * @version
+ */
+
+public class HepPoint {
+ enum Representation {Cartesian, Cylindrical, Spherical}
+ Representation representation;
+ private double[] coords;
+ private HepPoint() {
+ }
+
+ private double Cartesian2SphericalR() {
+ return sqrt(coords[0]*coords[0] + coords[1]*coords[1] + coords[2]*coords[2]);
+ }
+
+ private double Cartesian2SphericalPhi() {
+ return 0;
+ }
+
+ private double Cartesian2SphericalTheta() {
+ return 0;
+ }
+
+ private double Cartesian2CylindricalPhi() {
+ return Cartesian2SphericalPhi();
+ }
+
+ private double Cartesian2CylindricalR() {
+ return 0;
+ }
+
+ private double Cylindrical2SphericalR() {
+ return 0;
+ }
+
+ private double Cylindrical2SphericalTheta() {
+ return 0;
+ }
+
+ private double Cylindrical2CartesianX() {
+ return 0;
+ }
+
+ private double Cylindrical2CartesianY() {
+ return 0;
+ }
+
+ private double Spherical2CylindricalR() {
+ return 0;
+ }
+
+ private double Spherical2CartesianZ() {
+ return 0;
+ }
+
+ private double Spherical2CartesianX() {
+ return 0;
+ }
+
+ private double Spherical2CartesianY() {
+ return 0;
+ }
+
+ private double Spherical2CylindricalZ() {
+ return Spherical2CartesianZ();
+ }
+
+ public double getX(){
+ switch(representation) {
+ case Cartesian: return coords[0];
+ case Cylindrical: return Cylindrical2CartesianX();
+ case Spherical: return Spherical2CartesianX();
+ default: return Double.NaN;
+ }
+ }
+
+}