View Javadoc

1   package org.lcsim.util.swim;
2   
3   import org.lcsim.spacegeom.SpacePoint;
4   import org.lcsim.spacegeom.SpaceVector;
5   
6   import hep.physics.vec.Hep3Vector;
7   
8   /**
9    * A particle trajectory (either a Helix or a Line)
10   * @author tonyj
11   * @version $Id: Trajectory.java,v 1.8 2007/08/16 21:46:45 jstrube Exp $
12   */
13  public interface Trajectory
14  {
15     /**
16      * Gets a point after traveling distance alpha from the origin along the trajectory
17      */
18     SpacePoint getPointAtDistance(double alpha);
19    /**
20      * Calculates the distance at which the trajectory first reaches radius R.
21      * Returns Double.NaN if the trajectory does not intercept the cylinder.
22      * In principle there could be multiple solutions, so this method should
23      * always return the minimum <b>positive</b> solution.
24      */
25     
26     public double getDistanceToInfiniteCylinder(double r);
27    /** 
28      * Calculate the distance along the trajectory to reach a given Z plane.
29      * Note distance may be negative.
30      */
31     public double getDistanceToZPlane(double z);
32     
33    /**
34      * Obtain the point of closest approach (POCA)
35      * of the trajectory to a point. The return value is the distance
36      * parameter s, such that getPointAtDistance(s) is the POCA.
37      * @param point Point in space to swim to
38      * @return The length parameter s
39      */
40     // FIXME this should be a point rather than a vector
41     public double getDistanceToPoint(Hep3Vector point);
42     
43     /**
44      * Returns the momentum at a given distance from the origin
45      * @param alpha The length along the trajectory from the origin
46      * @return The momentum at the given distance
47      */
48     public SpaceVector getUnitTangentAtLength(double alpha);
49  }