Commit in lcsim/src/org/lcsim/util/swim on MAIN
Line.java+5-151.8 -> 1.9
In the case where we're asked to find the POCA of two parallel lines, we used to throw an exception internally and then return null. Instead, just return null.

lcsim/src/org/lcsim/util/swim
Line.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- Line.java	19 Oct 2005 10:32:53 -0000	1.8
+++ Line.java	8 Feb 2006 22:37:45 -0000	1.9
@@ -7,7 +7,7 @@
 /**
  * A straight line
  * @author tonyj
- * @version $Id: Line.java,v 1.8 2005/10/19 10:32:53 jstrube Exp $
+ * @version $Id: Line.java,v 1.9 2006/02/08 22:37:45 mcharles Exp $
  */
 public class Line implements Trajectory
 {
@@ -269,14 +269,8 @@
      */
     @Deprecated static public double[] getPOCAOfLines(Line line1, Line line2)
     {
-	double[] output = null;
-	try {
-	    output = line1.findTrackToTrackPOCA(line2);
-	    return output;
-	} catch (ParallelLinesException x) {
-	    // Er -- hm.
-	    return null;
-	}
+	double[] output = line1.findTrackToTrackPOCA(line2);
+	return output;
     }
 
     /**
@@ -284,7 +278,7 @@
      * This will probably be replaced by a more general vertexing solution
      * at some point, but for now it works.
      */
-    @Deprecated private double[] findTrackToTrackPOCA(Line otherLine) throws ParallelLinesException
+    @Deprecated private double[] findTrackToTrackPOCA(Line otherLine)
     {
 	Line line1 = this;
 	Line line2 = otherLine;
@@ -300,7 +294,7 @@
 	Hep3Vector perp = VecOp.cross(v1, v2);
 	if (perp.magnitude() == 0.0) {
 	    // Lines are parallel!
-	    throw new ParallelLinesException("Parallel lines");
+            return null;
 	} else {
 	    // Let the origin point along the lines be x1 and x2.
 	    // Let the unit vectors along the lines be v1 and v2.
@@ -350,10 +344,6 @@
 	}
     }
 
-    @Deprecated protected class ParallelLinesException extends Exception {
-	public ParallelLinesException(String m) { super(m); }
-    }
-
    /**
      * Defines a line in space. The line is defined by a point and a
      * direction vector. The magnitude of the direction vector is ignored.
CVSspam 0.2.8