Print

Print


Commit in lcsim on MAIN
src/org/lcsim/contrib/JanStrube/standalone/RaveProcessor$MyMagneticField.class[binary]added 1.1
                                          /Tracks$py.class[binary]added 1.1
                                          /NickTrack_FastMCTrackComparison.class[binary]added 1.1
                                          /FitterTestDriver.class[binary]added 1.1
                                          /RaveProcessor$MyPropagator.class[binary]added 1.1
                                          /RaveProcessor.class[binary]added 1.1
                                          /ReconParticleTestDriver$py.class[binary]added 1.1
                                          /MainLoop.class[binary]added 1.1
                                          /NickTrackVtxFitter.class[binary]added 1.1
src/org/lcsim/util/swim/JansLCIOTrackParameters.java+140added 1.1
                       /JansHelixSwimmer.java+137added 1.1
                       /Trajectory.java+9-11.7 -> 1.8
                       /Helix.java+17-31.25 -> 1.26
                       /Line.java+15-11.11 -> 1.12
src/org/lcsim/contrib/JanStrube/tracking/TrackingCalculator.pyc[binary]added 1.1
                                        /FastMCTrackFactory.java+3-21.1 -> 1.2
                                        /Track.java+3-31.7 -> 1.8
                                        /HelixSwimmer.java+2-21.8 -> 1.9
                                        /Helix.java+2-21.10 -> 1.11
test/org/lcsim/util/swim/JansHelixTest.java+356added 1.1
                        /JansLCIOParameterTest.java+82added 1.1
sandbox/JanStrube/.cvsignore+2added 1.1
                 /Tracks.py+10-41.1 -> 1.2
                 /MainLoop.py+4-41.1 -> 1.2
.project+231.5 -> 1.6
.cvsignore+11.9 -> 1.10
src/org/lcsim/contrib/JanStrube/standalone/at/hephy/Converter/LcioToRaveObjects.class[binary]added 1.1
+806-22
16 added + 11 modified, total 27 files
copying the HelixSwimmer from my contrib area to the trunk to remove dependencies on contrib.
This checkin is temporary and the new classes should be renamed as soon as possible. Somebody will have to port the TrackHelixConsistency test cases for this exercise to make sense.

lcsim/src/org/lcsim/util/swim
JansLCIOTrackParameters.java added at 1.1
diff -N JansLCIOTrackParameters.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ JansLCIOTrackParameters.java	16 Aug 2007 21:46:45 -0000	1.1
@@ -0,0 +1,140 @@
+/**
+ * @version $Id: JansLCIOTrackParameters.java,v 1.1 2007/08/16 21:46:45 jstrube Exp $
+ */
+package org.lcsim.util.swim;
+
+import static java.lang.Math.atan2;
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+import static java.lang.Math.sqrt;
+import static org.lcsim.constants.Constants.fieldConversion;
+
+import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.CartesianVector;
+import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
+
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.d0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.phi0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.omega;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.z0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.tanLambda;
+
+
+public class JansLCIOTrackParameters {
+	
+    public enum ParameterName {
+        d0, phi0, omega, z0, tanLambda
+    }
+
+    /**
+	 * Computes the momentum vector from a given parameter set
+	 * @param parameters The Parameter object 
+	 * @return The momentum vector corresponding to the given parameters
+	 */
+    public static SpaceVector Parameters2Momentum(JansLCIOTrackParameters parameters) {
+	    double pt = parameters.pt;
+	    
+	    return new CartesianVector(
+	                pt * cos(parameters.get(phi0))
+	                , pt * sin(parameters.get(phi0))
+	                , pt * parameters.get(tanLambda)
+	            );
+	}
+    /**
+     * Computes the point of closest approach on the track to the given reference point.
+     * Note that this function does not do any swimming. It merely returns a different representation of the given parameters.
+     * This is meaningless without the reference point however.
+     * In order to prevent the user from having to kow the implementation details, the reference point is made an explicit parameter.  
+     * @param parameters The Parameter object
+     * @param refPoint The reference point
+     * @return The point of closest approach on the track to the reference point
+     */
+	public static SpacePoint Parameters2Position(JansLCIOTrackParameters parameters, SpacePoint refPoint) {
+	    double d_0 = parameters.get(d0);
+	    double z_0 = parameters.get(z0);
+	    double phi_0 = parameters.get(phi0);
+	    
+	    double x = refPoint.x() - d_0*sin(phi_0);
+	    double y = refPoint.y() + d_0*cos(phi_0);
+	    double z = refPoint.z() + z_0;
+	    
+	    return new CartesianPoint(x, y, z);
+	}
+    /**
+	 * Calculates the parameters of the Track under the assumption that the
+	 * space-momentum representation is given at the POCA to the reference point. 
+	 * @param pos The point of closest approach on the track to the reference point
+     * @param mom The momentum vector at @see pos
+     * @param ref The reference point
+     * @param charge The charge of the particle
+     * @param Bz The z component of the magnetic field. Assuming a homogeneous field parallel to z
+	 * @return The Parameter object corresponding to the arguments
+	 */
+	public static JansLCIOTrackParameters SpaceMomentum2Parameters(SpacePoint pos, SpaceVector mom, SpacePoint ref, int charge, double field_z) {
+	    JansLCIOTrackParameters result = new JansLCIOTrackParameters();
+	    double aqBz = charge*field_z*fieldConversion;
+	    double x = pos.x() - ref.x();
+	    double y = pos.y() - ref.y();
+	    double z_0 = pos.z() - ref.z();
+	    double phi_0 = mom.phi();
+	    double pt = mom.rxy();
+	     
+	    result.set(d0, -x*sin(phi_0)+ y*cos(phi_0));
+	    result.set(phi0, phi_0);
+	    result.set(omega, aqBz/pt);
+	    result.set(z0, z_0);
+	    result.set(tanLambda, mom.z()/pt);
+	    result.setPt(pt);
+	    return result;
+	}
+	
+    double[] values;
+    double pt;
+    
+    public JansLCIOTrackParameters(JansLCIOTrackParameters parameters) {
+    	values = parameters.values.clone();
+    	pt = parameters.pt;
+    }
+    
+    JansLCIOTrackParameters() {
+        values = new double[5];
+        pt = 0;
+    }
+    
+    public JansLCIOTrackParameters(double[] vals, double p_t) {
+        values = vals;
+        pt = p_t;
+    }
+    
+    double get(ParameterName name) {
+        return values[name.ordinal()];
+    }
+    
+    public double getPt() {
+        return pt;
+    }
+        
+	public double[] getValues() {
+        return values;
+    }
+        
+    void set(ParameterName name, double val) {
+        values[name.ordinal()] = val;
+    }
+	
+	
+	void setPt(double p_t) {
+        pt = p_t;
+    }
+	
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(String.format("Parameters:\n"));
+		for (ParameterName p : ParameterName.values()) {
+			sb.append(String.format("%10s: %g\n", p.name(), values[p.ordinal()]));
+		}
+		sb.append(String.format("%10s: %g\n", "pt", pt));
+		return sb.toString(); 
+	}
+}

lcsim/src/org/lcsim/util/swim
JansHelixSwimmer.java added at 1.1
diff -N JansHelixSwimmer.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ JansHelixSwimmer.java	16 Aug 2007 21:46:45 -0000	1.1
@@ -0,0 +1,137 @@
+package org.lcsim.util.swim;
+
+import org.lcsim.recon.vertexing.zvtop4.VectorArithmetic;
+import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
+
+import static java.lang.Math.sin;
+import static java.lang.Math.cos;
+import static java.lang.Math.sqrt;
+import static org.lcsim.constants.Constants.fieldConversion;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.d0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.phi0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.omega;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.z0;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName.tanLambda;
+
+/**
+ * A simple helix swimmer for use in org.lcsim. Uses standard lcsim units Tesla, mm, GeV. This swimmer works for charged
+ * and neutral tracks.
+ * <p>
+ * For more info on swimming see <a href="doc-files/transport.pdf">this paper</a> by Paul Avery.
+ * 
+ * @author jstrube
+ * @version $Id: JansHelixSwimmer.java,v 1.1 2007/08/16 21:46:45 jstrube Exp $
+ */
+public class JansHelixSwimmer {
+    private double field;
+    private Trajectory _trajectory;
+    private SpaceVector _momentum;
+    private double _charge;
+
+    /**
+     * Creates a new instance of HelixSwimmer
+     * 
+     * @param B field strength in Tesla; uniform, solenoidal, directed along z-axis
+     */
+    public JansHelixSwimmer(double B) {
+        field = B * fieldConversion;
+    }
+
+    /**
+     * Sets parameters for helix swimmmer.
+     * 
+     * @param p 3-momentum (px,py,pz)
+     * @param r0 initial position(x0,y0,z0)
+     * @param iq charge iq = q/|e| = +1/0/-1
+     */
+    public void setTrack(SpaceVector p, SpacePoint r0, int iq) {
+        double phi = Math.atan2(p.y(), p.x());
+        double lambda = Math.atan2(p.z(), p.rxy());
+
+        if (iq != 0 && field != 0) {
+            double radius = p.rxy() / (iq * field);
+            _trajectory = new Helix(r0, radius, phi, lambda);
+        } else {
+            _trajectory = new Line(r0, phi, lambda);
+        }
+        _momentum = p;
+        _charge = iq;
+    }
+
+//    public void setTrack(Track t) {
+//        double r = 1 / t.getParameter(omega);
+//        double phi = t.getParameter(phi0);
+//        double lambda = Math.atan(t.getParameter(tanLambda));
+//
+//        SpacePoint ref = t.getReferencePoint();
+//        SpacePoint origin = t.getPosition();
+//        _trajectory = new Helix(origin, r, phi, lambda);
+//
+//        _charge = t.getCharge();
+//        double pt = r * _charge * field;
+//        _momentum = t.getMomentum();
+//    }
+
+
+    public SpacePoint getPointAtLength(double alpha) {
+        if (_trajectory == null) {
+            throw new RuntimeException("Trajectory not set");
+        }
+        return _trajectory.getPointAtDistance(alpha);
+    }
+
+    public double getDistanceToRadius(double r) {
+        if (_trajectory == null) {
+            throw new RuntimeException("Trajectory not set");
+        }
+        return _trajectory.getDistanceToInfiniteCylinder(r);
+    }
+
+    public double getDistanceToZ(double z) {
+        if (_trajectory == null) {
+            throw new RuntimeException("Trajectory not set");
+        }
+        double result = _trajectory.getDistanceToZPlane(z);
+        if (result < 0) {
+            result = _trajectory.getDistanceToZPlane( -z);
+        }
+        return result;
+    }
+
+    public double getDistanceToCylinder(double r, double z) {
+        double x1 = getDistanceToRadius(r);
+        double x2 = getDistanceToZ(z);
+        return Double.isNaN(x1) ? x2 : Math.min(x1, x2);
+    }
+
+    /**
+     * Returns the distance along the trajectory to get to the point of closest approach
+     * 
+     * @param point The point to swim as close as possible to
+     * @return the length parameter by how much the trajectory has to be swum
+     */
+    public double getTrackLengthToPoint(SpacePoint point) {
+        return _trajectory.getDistanceToPoint(point);
+    }
+
+
+    /**
+     * Returns the momentum on a point on the track at a distance from the origin
+     * 
+     * @param alpha The 2D distance from the origin along the track
+     * @return The components of the momentum in a SpacePoint
+     */
+    public SpaceVector getMomentumAtLength(double alpha) {
+        // the trajectory can only return the unit direction of the momentum
+        SpaceVector unitDirection = _trajectory.getUnitTangentAtLength(alpha);
+        double magnitude = _momentum.rxy();
+        // System.out.println("HelixSwimmer: momentum.magnitude= "+magnitude);
+        return VectorArithmetic.multiply(unitDirection, magnitude);
+    }
+
+    public Trajectory getTrajectory() {
+        return _trajectory;
+    }
+}

lcsim/src/org/lcsim/util/swim
Trajectory.java 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- Trajectory.java	15 Jul 2006 09:38:56 -0000	1.7
+++ Trajectory.java	16 Aug 2007 21:46:45 -0000	1.8
@@ -1,13 +1,14 @@
 package org.lcsim.util.swim;
 
 import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
 
 import hep.physics.vec.Hep3Vector;
 
 /**
  * A particle trajectory (either a Helix or a Line)
  * @author tonyj
- * @version $Id: Trajectory.java,v 1.7 2006/07/15 09:38:56 jstrube Exp $
+ * @version $Id: Trajectory.java,v 1.8 2007/08/16 21:46:45 jstrube Exp $
  */
 public interface Trajectory
 {
@@ -38,4 +39,11 @@
     */
    // FIXME this should be a point rather than a vector
    public double getDistanceToPoint(Hep3Vector point);
+   
+   /**
+    * Returns the momentum at a given distance from the origin
+    * @param alpha The length along the trajectory from the origin
+    * @return The momentum at the given distance
+    */
+   public SpaceVector getUnitTangentAtLength(double alpha);
 }

lcsim/src/org/lcsim/util/swim
Helix.java 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- Helix.java	2 Dec 2006 02:39:02 -0000	1.25
+++ Helix.java	16 Aug 2007 21:46:45 -0000	1.26
@@ -12,7 +12,9 @@
 import hep.physics.vec.VecOp;
 
 import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.CartesianVector;
 import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
 
 /**
  * This class represents a helix with its axis aligned along Z.
@@ -22,7 +24,7 @@
  * For more info on swimming see <a href="doc-files/transport.pdf">this paper</a>
  * by Paul Avery.
  * @author tonyj
- * @version $Id: Helix.java,v 1.25 2006/12/02 02:39:02 sinev Exp $
+ * @version $Id: Helix.java,v 1.26 2007/08/16 21:46:45 jstrube Exp $
  */
 public class Helix implements Trajectory
 {
@@ -206,7 +208,7 @@
    }
    
    /**
-    * Sets the parametereization in terms of "momentum" and charge
+    * Sets the parameterization in terms of "momentum" and charge
     *
     */
    private void setSpatialParameters() {
@@ -217,7 +219,19 @@
 	   rho = -cosLambda/radius;
    }
    
-   private Hep3Vector origin;
+   /**
+    * @param alpha
+    *            The distance along the trajectory in the x-y plane
+    * @return The unit vector of the momentum
+    */
+   public SpaceVector getUnitTangentAtLength(double alpha)
+   {
+       double angle = phi + alpha * rho;
+       return new CartesianVector(cos(angle), sin(angle), sinLambda
+               / cosLambda);
+   }
+   
+   Hep3Vector origin;
    double xCenter;
    double yCenter;
    private double radius;

lcsim/src/org/lcsim/util/swim
Line.java 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- Line.java	8 Jun 2007 21:29:53 -0000	1.11
+++ Line.java	16 Aug 2007 21:46:45 -0000	1.12
@@ -5,12 +5,14 @@
 import hep.physics.vec.VecOp;
 
 import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.CartesianVector;
 import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
 
 /**
  * A straight line
  * @author tonyj
- * @version $Id: Line.java,v 1.11 2007/06/08 21:29:53 ngraf Exp $
+ * @version $Id: Line.java,v 1.12 2007/08/16 21:46:45 jstrube Exp $
  */
 public class Line implements Trajectory
 {
@@ -390,4 +392,16 @@
             }
         }
     }
+    
+    
+    /**
+     * Calculates the <em>unit vector</em> of the momentum at a certain distance from the origin.
+     * Since the momentum is constant for a straight line,
+     * @param alpha is ignored
+     * @return The unit direction of the line, since there is now geometric way to obtain the momentum along a straight line.
+     */
+    public SpaceVector getUnitTangentAtLength(double alpha) {
+        SpaceVector lineDirection = new CartesianVector(cosLambda * cosPhi, cosLambda * sinPhi, sinLambda);
+        return lineDirection;
+    }
 }

lcsim/src/org/lcsim/contrib/JanStrube/tracking
FastMCTrackFactory.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- FastMCTrackFactory.java	19 Feb 2007 21:07:56 -0000	1.1
+++ FastMCTrackFactory.java	16 Aug 2007 21:46:45 -0000	1.2
@@ -1,5 +1,5 @@
 /**
- * @version $Id: FastMCTrackFactory.java,v 1.1 2007/02/19 21:07:56 jstrube Exp $
+ * @version $Id: FastMCTrackFactory.java,v 1.2 2007/08/16 21:46:45 jstrube Exp $
  */
 package org.lcsim.contrib.JanStrube.tracking;
 
@@ -60,7 +60,8 @@
      * field.
      * 
      */
-    FastMCTrackFactory(String detectorName, double field, boolean beamConstraint) {
+    @Deprecated
+    public FastMCTrackFactory(String detectorName, double field, boolean beamConstraint) {
         _Bz = field;
         _manager = ConditionsManager.defaultInstance();
         try {

lcsim/src/org/lcsim/contrib/JanStrube/tracking
Track.java 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- Track.java	28 Oct 2006 00:48:37 -0000	1.7
+++ Track.java	16 Aug 2007 21:46:45 -0000	1.8
@@ -1,5 +1,5 @@
 /**
- * @version $Id: Track.java,v 1.7 2006/10/28 00:48:37 jstrube Exp $
+ * @version $Id: Track.java,v 1.8 2007/08/16 21:46:45 jstrube Exp $
  */
 package org.lcsim.contrib.JanStrube.tracking;
 
@@ -23,14 +23,14 @@
     public abstract double getParameter(ParameterName name);
 
     /**
-     * Returns the parmeters container, which holds the 5 parameters and the pt
+     * Returns the parameters container, which holds the 5 parameters and the pt
      * @return The parameters for this Track
      */
     public abstract LCIOTrackParameters getParameters();
     
     /**
      * Accessor to the POCA of the reference point.
-     * This is just another way of parametrizing the track
+     * This is just another way of parameterizing the track
      * @return The POCA to the reference point
      */
     public abstract SpacePoint getPosition();

lcsim/src/org/lcsim/contrib/JanStrube/tracking
HelixSwimmer.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- HelixSwimmer.java	28 Oct 2006 00:48:38 -0000	1.8
+++ HelixSwimmer.java	16 Aug 2007 21:46:45 -0000	1.9
@@ -16,13 +16,13 @@
 import static org.lcsim.contrib.JanStrube.tracking.LCIOTrackParameters.ParameterName.tanLambda;
 
 /**
- * A simple helix smimmer for use in org.lcsim. Uses standard lcsim units Tesla, mm, GeV. This swimmer works for charged
+ * A simple helix swimmer for use in org.lcsim. Uses standard lcsim units Tesla, mm, GeV. This swimmer works for charged
  * and neutral tracks.
  * <p>
  * For more info on swimming see <a href="doc-files/transport.pdf">this paper</a> by Paul Avery.
  * 
  * @author jstrube
- * @version $Id: HelixSwimmer.java,v 1.8 2006/10/28 00:48:38 jstrube Exp $
+ * @version $Id: HelixSwimmer.java,v 1.9 2007/08/16 21:46:45 jstrube Exp $
  */
 public class HelixSwimmer {
     private double field;

lcsim/src/org/lcsim/contrib/JanStrube/tracking
Helix.java 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- Helix.java	12 Jul 2007 23:30:29 -0000	1.10
+++ Helix.java	16 Aug 2007 21:46:45 -0000	1.11
@@ -25,7 +25,7 @@
  * by Paul Avery.
  *
  * @author tonyj
- * @version $Id: Helix.java,v 1.10 2007/07/12 23:30:29 tknelson Exp $
+ * @version $Id: Helix.java,v 1.11 2007/08/16 21:46:45 jstrube Exp $
  */
 public class Helix implements Trajectory
 {
@@ -287,7 +287,7 @@
         }
         
         /**
-         * Sets the parametrization in terms of "momentum" and charge
+         * Sets the parameterization in terms of "momentum" and charge
          *
          */
         private void setSpatialParameters()

lcsim/test/org/lcsim/util/swim
JansHelixTest.java added at 1.1
diff -N JansHelixTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ JansHelixTest.java	16 Aug 2007 21:46:46 -0000	1.1
@@ -0,0 +1,356 @@
+package org.lcsim.util.swim;
+
+import static java.lang.Math.abs;
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+import hep.aida.ICloud2D;
+import junit.framework.*;
+import java.io.IOException;
+
+import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.CartesianVector;
+import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
+import org.lcsim.util.aida.AIDA;
+
+import hep.physics.vec.Hep3Vector;
+import hep.physics.vec.VecOp;
+/**
+ *
+ * @author tonyj
+ * @version $Id: JansHelixTest.java,v 1.1 2007/08/16 21:46:46 jstrube Exp $
+ */
+public class JansHelixTest extends TestCase
+{
+   
+   public JansHelixTest(String testName)
+   {
+      super(testName);
+   }
+
+   public static Test suite()
+   {
+      return new TestSuite(JansHelixTest.class);
+   }
+   
+   public void testCircle()
+   {
+      SpaceVector origin = new CartesianVector(1,0,0);
+      double radius = -1;
+      double phi = Math.PI/2;
+      double lambda = 0;
+      Helix circle = new Helix(origin,radius,phi,lambda);
+
+      assertEquals(origin, circle.getPointAtDistance(0));
+      assertEquals(origin, circle.getPointAtDistance(radius*Math.PI*2));
+      assertEquals(new CartesianVector(-1,0,0), circle.getPointAtDistance(Math.abs(radius*Math.PI)));
+      assertEquals(new CartesianVector(0,1,0), circle.getPointAtDistance(Math.abs(radius*Math.PI/2)));
+      
+      assertTrue(Double.isInfinite(circle.getDistanceToZPlane(1)));
+      assertTrue(Double.isNaN(circle.getDistanceToInfiniteCylinder(2)));
+      assertTrue(Double.isNaN(circle.getDistanceToInfiniteCylinder(0)));     
+      assertEquals(0,circle.getDistanceToInfiniteCylinder(1),1e-14);     
+   }
+   
+   public void testCircle2()
+   {
+      SpacePoint origin = new SpacePoint();
+      double radius = 1;
+      double phi = Math.PI/2;
+      double lambda = 0;
+      Helix circle = new Helix(origin,radius,phi,lambda);
+
+      assertEquals(origin, circle.getPointAtDistance(0));
+      assertEquals(origin, circle.getPointAtDistance(radius*Math.PI*2));
+      assertEquals(new CartesianVector(2,0,0), circle.getPointAtDistance(radius*Math.PI));
+      assertEquals(new CartesianVector(1,1,0), circle.getPointAtDistance(radius*Math.PI/2));
+                  
+      assertTrue(Double.isInfinite(circle.getDistanceToZPlane(1)));
+      assertTrue(Double.isNaN(circle.getDistanceToInfiniteCylinder(3*radius)));
+      assertEquals(radius*Math.PI,circle.getDistanceToInfiniteCylinder(2*radius),1e-14);
+      assertEquals(0,circle.getDistanceToInfiniteCylinder(0),1e-14);     
+   }
+   
+   public void testHelix()
+   {
+      SpacePoint origin = new SpacePoint();
+      double radius = 1;
+      double phi = Math.PI/2;
+      double lambda = Math.PI/4;
+      Helix helix = new Helix(origin,radius,phi,lambda);
+
+      assertEquals(origin, helix.getPointAtDistance(0));
+      double d = radius*Math.PI*2*Math.sqrt(2);
+      assertEquals(new CartesianVector(0,0,Math.PI*2), helix.getPointAtDistance(d));
+      assertEquals(new CartesianVector(2,0,Math.PI), helix.getPointAtDistance(d/2));
+      
+      assertEquals(d/2,helix.getDistanceToZPlane(Math.PI));
+      assertEquals(d,helix.getDistanceToZPlane(Math.PI*2));
+      assertTrue(Double.isNaN(helix.getDistanceToInfiniteCylinder(3*radius)));
+      assertEquals(d/2,helix.getDistanceToInfiniteCylinder(2*radius),1e-14);
+      assertEquals(1.4809609793861218,helix.getDistanceToInfiniteCylinder(radius),1e-14);
+      assertEquals(0,helix.getDistanceToInfiniteCylinder(0),1e-14);     
+   }
+   
+   public void testHelix2()
+   {
+      SpacePoint origin = new SpacePoint();
+      double radius = -1;
+      double phi = Math.PI/2;
+      double lambda = -Math.PI/4;
+      Helix helix = new Helix(origin,radius,phi,lambda);
+
+      assertEquals(origin, helix.getPointAtDistance(0));
+      double d = Math.PI*2*Math.sqrt(2);
+      assertEquals(new CartesianVector(0,0,-Math.PI*2), helix.getPointAtDistance(d));
+      assertEquals(new CartesianVector(-2,0,-Math.PI), helix.getPointAtDistance(d/2));
+      
+      assertEquals(d/2,helix.getDistanceToZPlane(-Math.PI));
+      assertEquals(d,helix.getDistanceToZPlane(-Math.PI*2));
+      assertTrue(Double.isNaN(helix.getDistanceToInfiniteCylinder(3)));
+      assertEquals(d/2,helix.getDistanceToInfiniteCylinder(2),1e-14);
+      assertEquals(1.4809609793861218,helix.getDistanceToInfiniteCylinder(1),1e-14);
+      assertEquals(0,helix.getDistanceToInfiniteCylinder(0),1e-14);     
+   }
+
+   public void testHelix3() throws IOException
+   {
+      SpacePoint origin = new SpacePoint();
+      double radius = 1;
+      double phi = Math.PI/2;
+      double lambda = Math.PI/4;
+      Helix helix = new Helix(origin,radius,phi,lambda);
+
+      double d = radius*Math.PI*2*Math.sqrt(2);
+      
+      AIDA aida = AIDA.defaultInstance();
+      ICloud2D xy = aida.cloud2D("xy");
+      ICloud2D rz = aida.cloud2D("rz");
+      for (int i=0; i<100; i++)
+      {
+         double alpha = i*d/100;
+         SpacePoint point  = helix.getPointAtDistance(alpha);
+         xy.fill(point.x(),point.y());
+         double r = Math.sqrt(point.x()*point.x()+point.y()*point.y());
+         rz.fill(r,point.z());
+      }
+      assertEquals(1,xy.meanX(),1e-14);
+      assertEquals(0,xy.meanY(),1e-14);
+      assertEquals(Math.sqrt(2)/2,xy.rmsX(),1e-14);
+      assertEquals(Math.sqrt(2)/2,xy.rmsY(),1e-14);
+      aida.saveAs("helix.aida");    
+   }
+   
+   public void testGetDistanceFromHelixToPoint() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = 1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix = new Helix(origin, radius, phi, lambda);
+       
+       // test "random" points on helix
+       for (int i=0; i<500; ++i) {
+           SpacePoint pointOnHelix = helix.getPointAtDistance(i*.27);
+           Hep3Vector xDiff = VecOp.sub(helix.origin, pointOnHelix);
+           double rho = -cos(lambda)/helix.getRadius();
+//           if (abs(xDiff.z()) > abs(helix.getRadius()*Math.tan(lambda)*Math.PI)) {
+//        	   System.out.printf("NOW:%f %f\n%s\n%s",abs(xDiff.z()), abs(helix.getRadius()*Math.tan(lambda)*Math.PI),helix.origin,pointOnHelix);
+//           }
+
+//           System.out.printf("%f\t%f\n", i*.27, Math.PI*radius/cos(lambda));
+           //           System.err.printf("%.3f, found: %s\n", i*.27, helix.getDistanceToPoint(pointOnHelix));
+           assertEquals(helix.getDistanceToPoint(pointOnHelix), i*.27, 1e-10);
+       }
+       
+       // test that the distance to points has the right period along z
+       double period = 2*Math.PI*radius/Math.cos(lambda);
+       double offset = helix.getDistanceToPoint(new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()));
+       for (int i=0; i<5; ++i) {
+            SpacePoint newPoint = new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            assertEquals(helix.getDistanceToPoint(newPoint), offset+i*period, 1e-10);
+       }
+   }
+
+   // same as before, neg. alpha
+   public void testGetDistanceFromNegHelixToPoint() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = 1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix = new Helix(origin, radius, phi, lambda);
+       
+       // test "random" points on helix
+       for (int i=0; i<500; ++i) {
+           SpacePoint pointOnHelix = helix.getPointAtDistance(-i*.27);
+//           System.err.printf("%.3f, found: %s\n", -i*.27, helix.getDistanceToPoint(pointOnHelix));
+           assertEquals(helix.getDistanceToPoint(pointOnHelix), -i*.27, 1e-10);
+       }
+       
+       // test that the distance to points has the right period along z
+       double period = 2*Math.PI*radius/Math.cos(lambda);
+       double offset = helix.getDistanceToPoint(new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()));
+       for (int i=0; i<5; ++i) {
+            SpacePoint newPoint = new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            assertEquals(helix.getDistanceToPoint(newPoint), offset+i*period, 1e-10);
+       }
+   }
+   
+   // same as before, neg. radius
+   public void testGetDistanceFromNegHelixRadiusToPoint() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = -1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix = new Helix(origin, radius, phi, lambda);
+       double period = 2*Math.PI*radius/Math.cos(lambda);
+//       System.out.println(period);
+       // test "random" points on helix
+       for (int i=0; i<500; ++i) {
+           SpacePoint pointOnHelix = helix.getPointAtDistance(-i*.27);
+//           System.out.println(pointOnHelix.z());
+//           System.err.printf("%.3f, found: %s\n", -i*.27, helix.getDistanceToPoint(pointOnHelix));
+           assertEquals(helix.getDistanceToPoint(pointOnHelix), -i*.27, 1e-10);
+       }
+       
+       // test that the distance to points has the right period along z
+       double offset = helix.getDistanceToPoint(new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()));
+       for (int i=0; i<5; ++i) {
+            SpacePoint newPoint = new CartesianPoint(origin.x()+0.333, origin.y(), origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            assertEquals(helix.getDistanceToPoint(newPoint), offset+i*period, 1e-10);
+       }
+   }
+
+   public void testGetSignedClosestDifferenceToPoint() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = 1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix = new Helix(origin, radius, phi, lambda);
+       
+       // test that the distance to points has the right period along z
+       double period = 2*Math.PI*radius/Math.cos(lambda);
+       
+       final double offset1 = 0.333;
+       final double offset2 = 1.23;
+       final double offset3 = .77;
+       double point1 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x()+offset1, origin.y(), origin.z()));
+       double point2 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x(), origin.y()+offset2, origin.z()));
+       double point3 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x()+offset3, origin.y()+offset3, origin.z()));
+       
+       for (int i=0; i<5; ++i) {
+            SpacePoint newPoint1 = new CartesianPoint(origin.x()+offset1, origin.y(), origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            SpacePoint newPoint2 = new CartesianPoint(origin.x(), origin.y()+offset2, origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            SpacePoint newPoint3 = new CartesianPoint(origin.x()+offset3, origin.y()+offset3, origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+//            System.out.println("Point " + i + newPoint.toString());
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint1), point1, 1e-10);
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint2), point2, 1e-10);
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint3), point3, 1e-10);
+       }
+       // move along the center and check for constant distance
+       SpacePoint originCenter = new CartesianPoint(origin.x()-radius*cos(phi), origin.y()+radius*sin(phi), origin.z());
+       double dist0 = helix.getSignedClosestDifferenceToPoint(originCenter);
+       for (int i=-250; i<250; ++i) {
+           SpacePoint pointOnCenter = new CartesianPoint(origin.x()-radius*cos(phi), origin.y()+radius*sin(phi), i/2);
+           assertEquals(helix.getSignedClosestDifferenceToPoint(pointOnCenter), dist0, 1e-10);
+       }
+   }
+  
+   // same as before, neg. radius
+   public void testGetSignedClosestDifferenceToPointNeg() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = -1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix = new Helix(origin, radius, phi, lambda);
+       
+       // test that the distance to points has the right period along z
+       double period = 2*Math.PI*radius/Math.cos(lambda);
+       
+       final double offset1 = 0.333;
+       final double offset2 = 1.23;
+       final double offset3 = .77;
+       double point1 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x()+offset1, origin.y(), origin.z()));
+       double point2 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x(), origin.y()+offset2, origin.z()));
+       double point3 = helix.getSignedClosestDifferenceToPoint(new CartesianPoint(origin.x()+offset3, origin.y()+offset3, origin.z()));
+       
+       for (int i=0; i<5; ++i) {
+            SpacePoint newPoint1 = new CartesianPoint(origin.x()+offset1, origin.y(), origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            SpacePoint newPoint2 = new CartesianPoint(origin.x(), origin.y()+offset2, origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+            SpacePoint newPoint3 = new CartesianPoint(origin.x()+offset3, origin.y()+offset3, origin.z()+i*radius*Math.tan(lambda)*Math.PI*2);
+//            System.out.println("Point " + i + newPoint.toString());
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint1), point1, 1e-10);
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint2), point2, 1e-10);
+            assertEquals(helix.getSignedClosestDifferenceToPoint(newPoint3), point3, 1e-10);
+       }
+       // move along the center and check for constant distance
+       SpacePoint originCenter = new CartesianPoint(origin.x()-radius*cos(phi), origin.y()+radius*sin(phi), origin.z());
+       double dist0 = helix.getSignedClosestDifferenceToPoint(originCenter);
+       for (int i=-250; i<250; ++i) {
+           SpacePoint pointOnCenter = new CartesianPoint(origin.x()-radius*cos(phi), origin.y()+radius*sin(phi), i/2);
+           assertEquals(helix.getSignedClosestDifferenceToPoint(pointOnCenter), dist0, 1e-10);
+       }
+   }
+
+   public void testGetTangentAtDistance() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = -1.7;
+       double phi = Math.PI/4;
+       double lambda = Math.PI/4;
+       Helix helix1 = new Helix(origin, radius, phi, lambda);
+       Helix helix2 = new Helix(origin, -radius, phi, lambda);
+       
+       for (int i=0; i<25; ++i) {
+           SpacePoint tangentAtThisPiece_1 = helix1.getUnitTangentAtLength(i*.37); 
+           SpacePoint tangentAtThisPiece_2 = helix2.getUnitTangentAtLength(i*.37); 
+           // momentum conservation
+           assertEquals(tangentAtThisPiece_1.magnitude(), helix1.getUnitTangentAtLength((i+1)*.37).magnitude(), 1e-10);
+           assertEquals(tangentAtThisPiece_2.magnitude(), helix2.getUnitTangentAtLength(i*.37).magnitude());
+           // both positively and negatively charged tracks must be moving forward
+           assertEquals(tangentAtThisPiece_1.z(), tangentAtThisPiece_2.z());
+       }
+   }
+   
+   public void testCurvatureSign() {
+       SpacePoint origin = new CartesianPoint(3, 6, 9);
+       double radius = 1.5;
+       double phi = Math.PI/2;
+       double lambda = 1.3;
+       for (int iPhi=0; iPhi<50; ++iPhi) {
+           Helix helix1 = new Helix(origin, radius, iPhi*phi, lambda);
+           Helix helix2 = new Helix(origin, -radius, iPhi*phi, lambda);
+           Helix helix5 = new Helix(origin, radius, Math.PI-iPhi*phi, lambda);
+           Helix helix6 = new Helix(origin, -radius, Math.PI-iPhi*phi, lambda);
+           assertEquals(helix1.yCenter, helix6.yCenter, 1e-10);
+           assertEquals(helix1.xCenter, helix5.xCenter, 1e-10);
+           assertEquals(helix2.xCenter, helix6.xCenter, 1e-10);
+           assertEquals(helix2.yCenter, helix5.yCenter, 1e-10);
+       }
+       Helix helix1 = new Helix(origin, radius, phi, lambda);
+       Helix helix2 = new Helix(origin, -radius, phi, lambda);
+       
+       SpacePoint h1 = helix1.getPointAtDistance(Math.PI/2*radius/cos(lambda));
+       assertEquals(h1.x(), 4.5, 1e-14);
+       assertEquals(h1.y(), 7.5, 1e-14);
+       assertTrue(h1.z() > origin.z());
+       SpacePoint h2 = helix2.getPointAtDistance(Math.PI/2*radius/cos(lambda));
+       assertEquals(h2.x(), 1.5, 1e-14);
+       assertEquals(h2.y(), 7.5, 1e-14);
+       assertTrue(h2.z() > origin.z());
+       SpacePoint h3 = helix1.getPointAtDistance(-Math.PI/2*radius/cos(lambda));
+       assertEquals(h3.x(), 4.5, 1e-14);
+       assertEquals(h3.y(), 4.5, 1e-14);
+       assertTrue(h3.z() < origin.z());
+       SpacePoint h4 = helix2.getPointAtDistance(-Math.PI/2*radius/cos(lambda));
+       assertEquals(h4.x(), 1.5, 1e-14);
+       assertEquals(h4.y(), 4.5, 1e-14);
+       assertTrue(h4.z() < origin.z()); 
+   }
+   
+   
+   private void assertEquals(SpacePoint v1, SpacePoint v2)
+   {
+      assertEquals(v1.x(),v2.x(), 1e-14);
+      assertEquals(v1.y(),v2.y(), 1e-14);
+      assertEquals(v1.z(),v2.z(), 1e-14);
+   }
+}

lcsim/test/org/lcsim/util/swim
JansLCIOParameterTest.java added at 1.1
diff -N JansLCIOParameterTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ JansLCIOParameterTest.java	16 Aug 2007 21:46:46 -0000	1.1
@@ -0,0 +1,82 @@
+package org.lcsim.util.swim;
+
+import org.lcsim.spacegeom.CartesianPoint;
+import org.lcsim.spacegeom.CartesianVector;
+import org.lcsim.spacegeom.SpacePoint;
+import org.lcsim.spacegeom.SpaceVector;
+import static org.lcsim.util.swim.JansLCIOTrackParameters.ParameterName;
+
+import junit.framework.TestCase;
+
+public class JansLCIOParameterTest extends TestCase {
+
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public void testParameterConversion() {
+	    SpacePoint pos = new CartesianPoint(3, 2, 1);
+	    SpaceVector mom = new CartesianVector(4, 20, -9);
+	    SpacePoint ref1 = new SpacePoint();
+	    SpacePoint ref2 = new CartesianPoint(-1, -2, -30);
+	    for (int charge=-2; charge<3; charge++) {
+    		for (double field=-5; field<5.1; field += 0.5) {
+    			JansLCIOTrackParameters parms = JansLCIOTrackParameters.SpaceMomentum2Parameters(pos, mom, pos, charge, field);
+    			assertEquals(pos, JansLCIOTrackParameters.Parameters2Position(parms, pos));
+    			assertEquals(mom, JansLCIOTrackParameters.Parameters2Momentum(parms));
+    		}
+	    }
+	}
+	
+	// Test the conversion on some easily predefined geometries
+	public void testCircle() {
+	    double field = -1.;
+	    SpacePoint location = new CartesianPoint(1, 0, 0);
+	    SpaceVector mom = new CartesianVector(0, -1, 1);
+	    SpacePoint zero = new SpacePoint();
+	    JansLCIOTrackParameters params = JansLCIOTrackParameters.SpaceMomentum2Parameters(location, mom, zero, 1, field);
+	    assertEquals(params.pt, 1.0);
+	    assertEquals(params.get(ParameterName.z0), 0.0);
+	    assertEquals(params.get(ParameterName.d0), 1.0);
+	    assertEquals(mom, JansLCIOTrackParameters.Parameters2Momentum(params));
+	    assertEquals(location, JansLCIOTrackParameters.Parameters2Position(params, zero));
+
+	    // The reference point has to be on the y axis
+	    SpacePoint refPoint = new CartesianPoint(-20, 0, -60);
+	    JansLCIOTrackParameters params2 = JansLCIOTrackParameters.SpaceMomentum2Parameters(location, mom, refPoint, -1, -field); 
+    	
+	    assertEquals(params2.pt, 1.0);
+	    assertEquals(params2.get(ParameterName.z0), 60.0);
+	    assertEquals(params2.get(ParameterName.d0), -(refPoint.x()-1.0));
+	    assertEquals(mom, JansLCIOTrackParameters.Parameters2Momentum(params2));
+	    assertEquals(location, JansLCIOTrackParameters.Parameters2Position(params2, refPoint));
+	}
+
+	// test a bit more complicated Geometry
+	public void testConversion() {
+	    double field = -7.2;
+	    int charge = 13;
+	    SpacePoint location = new CartesianPoint(3.6, 4.7, 2.9);
+	    SpaceVector mom = new CartesianVector(1, 0, 2);
+	    // make sure it's the same y as the location
+	    SpacePoint refPoint = new CartesianPoint(3.6, 9.2, -11.7);
+	    JansLCIOTrackParameters params = JansLCIOTrackParameters.SpaceMomentum2Parameters(location, mom, refPoint, charge, field);
+	    assertEquals(params.get(ParameterName.phi0), 0, 1e-15);
+	    assertEquals(params.get(ParameterName.d0), -4.5, 1e-10);
+	    SpaceVector newMom = JansLCIOTrackParameters.Parameters2Momentum(params);
+	    SpacePoint newPos = JansLCIOTrackParameters.Parameters2Position(params, refPoint);
+	    assertEquals(newMom, mom);
+	    assertEquals(newPos, location);
+	}
+
+
+	void assertEquals(SpacePoint a, SpacePoint b) {
+	        assertEquals(a.x(), b.x(), 1e-10);
+	        assertEquals(a.y(), b.y(), 1e-10);
+	        assertEquals(a.z(), b.z(), 1e-10);	
+	}
+}

lcsim/sandbox/JanStrube
.cvsignore added at 1.1
diff -N .cvsignore
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .cvsignore	16 Aug 2007 21:46:46 -0000	1.1
@@ -0,0 +1,2 @@
+*.class
+*.aida

lcsim/sandbox/JanStrube
Tracks.py 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- Tracks.py	21 Feb 2007 00:42:19 -0000	1.1
+++ Tracks.py	16 Aug 2007 21:46:46 -0000	1.2
@@ -1,7 +1,7 @@
 from org.lcsim.util.aida import AIDA
 from org.lcsim.util import Driver
 from org.lcsim.mc.fast.tracking import ReconTrack
-from org.lcsim.contrib.JanStrube.tracking import LCIOTrackParameters, NewFastMCTrackFactory
+from org.lcsim.contrib.JanStrube.tracking import LCIOTrackParameters, FastMCTrackFactory
 from org.lcsim.spacegeom import CartesianPoint, CartesianVector
 from org.lcsim.util.swim import HelixSwimmer as Swimmer_old
 from org.lcsim.contrib.JanStrube.tracking import HelixSwimmer as Swimmer_new
@@ -16,6 +16,8 @@
     def __init__(self):
         self.aida = AIDA.defaultInstance()
         self.i = 0
+        self.aida.tree().mkdir('OldTrack')
+        self.aida.tree().mkdir('NewTrack')
 
     # show that the track parameterization in the FastMC is bull
     def process(self, event):
@@ -39,7 +41,7 @@
             #print 'LCIOTrackParameters:', emap_old
             #print LCIOTrackParameters.Parameters2Momentum(emap_old)
             #print LCIOTrackParameters.Parameters2Position(emap_old, refPoint)
-            trackFac = NewFastMCTrackFactory(event, false)
+            trackFac = FastMCTrackFactory(event, false)
             o = origin
             p = momentum
             c = int(particle.getCharge())
@@ -47,13 +49,17 @@
             newT_unsmeared = trackFac.getTrack(CartesianVector(p.x(), p.y(), p.z()), CartesianPoint(o.x(), o.y(), o.z()), CartesianPoint(0, 0, 0), c, Random(), false)
             emap_new = newT.getParameters()
             vals_old = emap_old.getValues()
-            self.aida.cloud1D('OldTrack/d0').fill(vals_old[0])
+            self.aida.tree().cd('OldTrack')
+            self.aida.cloud1D('d0').fill(vals_old[0])
+            self.aida.tree().cd('/')
             self.aida.cloud1D('OldTrack/phi0').fill(vals_old[1])
             self.aida.cloud1D('OldTrack/omega').fill(vals_old[2])
             self.aida.cloud1D('OldTrack/z0').fill(vals_old[3])
             self.aida.cloud1D('OldTrack/tanLambda').fill(vals_old[4])
             vals_new = emap_new.getValues()
-            self.aida.cloud1D('NewTrack/d0').fill(vals_new[0])
+            self.aida.tree().cd('NewTrack')
+            self.aida.cloud1D('d0').fill(vals_new[0])
+            self.aida.tree().cd('/')
             self.aida.cloud1D('NewTrack/phi0').fill(vals_new[1])
             self.aida.cloud1D('NewTrack/omega').fill(vals_new[2])
             self.aida.cloud1D('NewTrack/z0').fill(vals_new[3])

lcsim/sandbox/JanStrube
MainLoop.py 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- MainLoop.py	21 Feb 2007 00:42:19 -0000	1.1
+++ MainLoop.py	16 Aug 2007 21:46:46 -0000	1.2
@@ -13,7 +13,7 @@
 from java.lang import Boolean
 from ReconParticleTestDriver import ReconParticleTestDriver
 import NickTrackVtxFitter
-from org.lcsim.contrib.JanStrube.tracking import NewMCFastTrackDriver
+from org.lcsim.contrib.JanStrube.tracking import FastMCTrackDriver
 from Tracks import TrackTest, TrackErrorMatrix
 
 True = Boolean("true")
@@ -32,11 +32,11 @@
 #    loop.setStdhepRecordSource(trackFile, "sidaug05")
     loop.setLCIORecordSource(trackFile)
     # no beamspotConstraint, no simple smearing
-#    loop.add(MCFast(False, False))
+    loop.add(MCFast(False, False))
+#    loop.add(FastMCTrackDriver())
     loop.add(FitterTestDriver())
-#    loop.add(TrackTest())
+    loop.add(TrackTest())
 #    loop.add(TrackErrorMatrix())
-#    loop.add(NewMCFastTrackDriver())
 #    loop.add(NickTrackVtxFitter())
 #    loop.add(ZvTubePlotter())
 #    loop.add(VertexFitterDriver())

lcsim
.project 1.5 -> 1.6
diff -N .project
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .project	16 Aug 2007 21:46:46 -0000	1.6
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>lcsim</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>

lcsim
.cvsignore 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- .cvsignore	9 Apr 2007 05:11:11 -0000	1.9
+++ .cvsignore	16 Aug 2007 21:46:46 -0000	1.10
@@ -18,3 +18,4 @@
 filter.stdhep
 bin
 test2.slcio
+*.slcio
CVSspam 0.2.8