Print

Print


Commit in lcsim/src/org/lcsim/util/swim on MAIN
HelixSwim.java+15-11.4 -> 1.5
added getPointAtLength to aid in migration to SpaceGeom

lcsim/src/org/lcsim/util/swim
HelixSwim.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- HelixSwim.java	14 May 2005 00:26:55 -0000	1.4
+++ HelixSwim.java	3 Aug 2005 22:53:37 -0000	1.5
@@ -2,6 +2,8 @@
 import java.util.ArrayList;
 import java.util.List;
 import org.lcsim.event.Track;
+import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.SpacePoint;
 
 /**
  * Given a particle of initial momentum, position and charge
@@ -11,7 +13,7 @@
  * This implementation works for charged and neutral particles alike.
  *
  * @author  W.Walkowiak
- * @version $Id: HelixSwim.java,v 1.4 2005/05/14 00:26:55 tonyj Exp $
+ * @version $Id: HelixSwim.java,v 1.5 2005/08/03 22:53:37 jstrube Exp $
  */
 public class HelixSwim
 {
@@ -108,9 +110,21 @@
     
     
     /**
+     * Swims the track to a point at a distance alpha
+     * @param alpha The length parameter
+     * @return The point at a length alpha from the origin
+     */
+    // FIXME the parameter alpha is not well defined
+    public SpacePoint getPointAtLength(double alpha) {
+        return new CartesianPoint(swimBy(alpha));
+    }
+    
+    /**
      * swim along this track to point at distance alpha from it's origin
      * (in positive track direction)
+     * @deprecated in favor of @see getPointAtLength
      */
+    @Deprecated
     public double[] swimBy(double alpha)
     {
 	if ( alpha != m_alpha || !centerOK ) isValid = false;
CVSspam 0.2.8