Commit in lcsim/src/org/lcsim on MAIN
event/Track.java+5-51.4 -> 1.5
recon/vertexing/zvtop4/ZvSwimmer.java+11.10 -> 1.11
                      /ZvTrack.java+22-1621.18 -> 1.19
util/heprep/ZvVertexConverter.java+1-11.1 -> 1.2
+29-168
4 modified files
Cleaned up Track.Parameters and minor changes.

lcsim/src/org/lcsim/event
Track.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- Track.java	12 May 2005 23:29:09 -0000	1.4
+++ Track.java	12 Aug 2005 03:09:05 -0000	1.5
@@ -49,11 +49,11 @@
         
         @Deprecated public double get(int i) {
             switch (i) {
-            case 1: return d0;
-            case 2: return phi0;
-            case 3: return omega;
-            case 4: return z0;
-            case 5: return s;
+            case 0: return d0;
+            case 1: return phi0;
+            case 2: return omega;
+            case 3: return z0;
+            case 4: return s;
             }
             return 0;
         }

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvSwimmer.java 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- ZvSwimmer.java	2 Aug 2005 17:55:23 -0000	1.10
+++ ZvSwimmer.java	12 Aug 2005 03:09:05 -0000	1.11
@@ -39,6 +39,7 @@
     /**
      * @param B
      */
+    // FIXME all the constructors can leave the class in an inconsistent state
     public ZvSwimmer(double B) {
         super(B);
         // TODO Auto-generated constructor stub

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvTrack.java 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- ZvTrack.java	9 Aug 2005 22:56:10 -0000	1.18
+++ ZvTrack.java	12 Aug 2005 03:09:05 -0000	1.19
@@ -6,6 +6,7 @@
 import hep.physics.vec.BasicHep3Vector;
 import hep.physics.vec.Hep3Vector;
 
+import java.util.EnumSet;
 import java.util.List;
 
 import org.lcsim.event.Track;
@@ -43,7 +44,16 @@
     Track orgTrack;
 
     double trackRotationAngle;
-
+    
+    public String toString() {
+        StringBuffer result = new StringBuffer();
+        result.append("ZvTrack: \n");
+        result.append("\tRef Point: " + _referencePoint.toString());
+        for (ZvParameterNames iParm : EnumSet.allOf(ZvParameterNames.class)) {
+            result.append("\tParameter " + iParm.name() + "  " + _parameters.get(iParm) + "\n");
+        }
+        return result.toString();
+    }
     // package wide constructor ensures I don't have to worry about anybody
     // creating invalid ZvTracks.
     // Only used to create Track-IP
@@ -444,7 +454,7 @@
         double pt = sqrt(px * px + py * py);
 
         _parameters = new ZvParameters();
-        _parameters.kappa = 1 / pt;
+        _parameters.kappa = t.getTrackParameter(2);
         // FIXME hardcoded order - dangerous
         // ZvTrack.phi == Track.phi0 :-(
         // FIXME phi == trackRotationAngle ?
@@ -504,6 +514,16 @@
         return _errorMatrix;
     }
 
+    
+    /**
+     * Calculates the lengthParameter s at which the ZvTrack is closest to the
+     * given SpacePoint
+     * 
+     * @param point
+     *            The point in space to which to calculate the distance
+     * @return the length parameter
+     */
+    // Apologies about the form. Automatic code generation by Maple(C)
     double closestParabolaPointOptimized(SpacePoint point) {
         double x1 = point.x();
         double y1 = point.y();
@@ -597,164 +617,4 @@
         t178 = Math.pow(-54 * t5 * t4 - 0.54e2 * t10 * t8 + 0.54e2 * t14 * t13 + 54 * z1 * t4 + 0.6e1 * t175, 0.1e1 / 0.3e1);
         return(t178 * t2 / 0.6e1 + 0.1e1 / t178 * t2 * (0.2e1 * t157 + 0.2e1 * t152 - t20 - 0.2e1 * t150 - 0.1e1));
     }
-    
-    /**
-     * Calculates the lengthParameter s at which the ZvTrack is closest to the
-     * given SpacePoint
-     * 
-     * @param point
-     *            The point in space to which to calculate the distance
-     * @return the length parameter
-     */
-    // Apologies about the form. Automatic code generation by Maple(C)
-    double closestParabolaPoint(SpacePoint point) {
-        double x1 = point.x();
-        double y1 = point.y();
-        double z1 = point.z();
-        double kappa = _parameters.kappa;
-        double tanLambda = _parameters.tanLambda;
-        double theta = trackRotationAngle;
-        double x0 = rotateLocation(_referencePoint).x();
-        double z0 = _referencePoint.z();
-        double result = ((Math.pow(0.54e2
-                * kappa
-                * y1
-                * Math.cos(theta)
-                - 0.54e2
-                * kappa
-                * tanLambda
-                * z0
-                + 0.54e2
-                * kappa
-                * tanLambda
-                * z1
-                - 0.54e2
-                * kappa
-                * x1
-                * Math.sin(theta)
-                + 0.6e1
-                * Math.sqrt(0.6e1 + 0.72e2 * tanLambda * tanLambda * x0 * kappa + 0.81e2 * kappa
-                        * kappa * tanLambda * tanLambda * z0 * z0 + 0.72e2 * tanLambda * tanLambda
-                        * x0 * x0 * kappa * kappa + 0.36e2 * Math.pow(tanLambda, 0.4e1) * x0
-                        * kappa + 0.36e2 * x0 * kappa + 0.48e2 * Math.pow(x0, 0.3e1)
-                        * Math.pow(kappa, 0.3e1) + 0.72e2 * x0 * x0 * kappa * kappa + 0.6e1
-                        * Math.pow(tanLambda, 0.6e1) + 0.18e2 * Math.pow(tanLambda, 0.4e1) + 0.18e2
-                        * tanLambda * tanLambda + 0.72e2 * y1 * y1 * kappa * kappa + 0.81e2 * kappa
-                        * kappa * x1 * x1 + 0.144e3 * y1 * kappa * kappa * Math.sin(theta) * x1
-                        * Math.cos(theta) * tanLambda * tanLambda + 0.162e3 * kappa * kappa * y1
-                        * Math.cos(theta) * tanLambda * z1 + 0.288e3 * y1 * Math.pow(kappa, 0.3e1)
-                        * Math.sin(theta) * x1 * Math.cos(theta) * x0 - 0.162e3 * kappa * kappa
-                        * y1 * Math.cos(theta) * tanLambda * z0 - 0.144e3 * x1 * kappa * kappa
-                        * Math.cos(theta) * tanLambda * tanLambda * x0 - 0.162e3 * kappa * kappa
-                        * tanLambda * z1 * x1 * Math.sin(theta) + 0.162e3 * kappa * kappa
-                        * tanLambda * z0 * x1 * Math.sin(theta) - 0.144e3 * y1
-                        * Math.pow(kappa, 0.3e1) * Math.sin(theta) * x1 * x1
-                        * Math.pow(Math.cos(theta), 0.2e1) - 0.144e3 * y1 * kappa * kappa
-                        * Math.sin(theta) * tanLambda * tanLambda * x0 - 0.18e2 * y1 * kappa
-                        * kappa * Math.sin(theta) * x1 * Math.cos(theta) - 0.144e3
-                        * Math.pow(Math.cos(theta), 0.2e1) * y1 * y1 * Math.pow(kappa, 0.3e1) * x0
-                        + 0.144e3 * Math.pow(Math.cos(theta), 0.3e1) * y1 * y1
-                        * Math.pow(kappa, 0.3e1) * x1 - 0.144e3 * y1 * y1 * Math.pow(kappa, 0.3e1)
-                        * x1 * Math.cos(theta) - 0.72e2 * Math.pow(Math.cos(theta), 0.2e1) * y1
-                        * y1 * kappa * kappa * tanLambda * tanLambda + 0.48e2 * Math.sin(theta)
-                        * Math.pow(y1, 0.3e1) * Math.pow(kappa, 0.3e1)
-                        * Math.pow(Math.cos(theta), 0.2e1) + 0.72e2 * y1 * y1 * kappa * kappa
-                        * tanLambda * tanLambda + 0.81e2 * kappa * kappa * tanLambda * tanLambda
-                        * z1 * z1 - 0.48e2 * Math.pow(x1, 0.3e1) * Math.pow(kappa, 0.3e1)
-                        * Math.pow(Math.cos(theta), 0.3e1) + 0.9e1 * kappa * kappa * y1 * y1
-                        * Math.pow(Math.cos(theta), 0.2e1) - 0.9e1 * x1 * x1 * kappa * kappa
-                        * Math.pow(Math.cos(theta), 0.2e1) - 0.36e2 * y1 * kappa * Math.sin(theta)
-                        - 0.36e2 * x1 * kappa * Math.cos(theta) + 0.144e3 * y1 * y1
-                        * Math.pow(kappa, 0.3e1) * x0 - 0.48e2 * Math.sin(theta)
-                        * Math.pow(y1, 0.3e1) * Math.pow(kappa, 0.3e1) - 0.144e3 * y1 * kappa
-                        * kappa * Math.sin(theta) * x0 - 0.144e3 * x1 * kappa * kappa
-                        * Math.cos(theta) * x0 - 0.36e2 * y1 * kappa * Math.sin(theta)
-                        * Math.pow(tanLambda, 0.4e1) - 0.72e2 * y1 * kappa * Math.sin(theta)
-                        * tanLambda * tanLambda - 0.144e3 * y1 * Math.pow(kappa, 0.3e1)
-                        * Math.sin(theta) * x0 * x0 - 0.162e3 * kappa * kappa * tanLambda
-                        * tanLambda * z0 * z1 - 0.144e3 * x1 * Math.pow(kappa, 0.3e1)
-                        * Math.cos(theta) * x0 * x0 - 0.36e2 * x1 * kappa * Math.cos(theta)
-                        * Math.pow(tanLambda, 0.4e1) + 0.144e3 * x1 * x1 * Math.pow(kappa, 0.3e1)
-                        * Math.pow(Math.cos(theta), 0.2e1) * x0 + 0.72e2 * x1 * x1 * kappa * kappa
-                        * Math.pow(Math.cos(theta), 0.2e1) * tanLambda * tanLambda - 0.72e2 * x1
-                        * kappa * Math.cos(theta) * tanLambda * tanLambda), 0.2e1 / 0.3e1)
-                + 0.12e2
-                * y1
-                * kappa
-                * Math.sin(theta)
-                + 0.12e2
-                * x1
-                * kappa
-                * Math.cos(theta)
-                - 0.6e1 * tanLambda * tanLambda - 0.12e2 * x0 * kappa - 0.6e1)
-                * Math.pow(0.54e2
-                        * kappa
-                        * y1
-                        * Math.cos(theta)
-                        - 0.54e2
-                        * kappa
-                        * tanLambda
-                        * z0
-                        + 0.54e2
-                        * kappa
-                        * tanLambda
-                        * z1
-                        - 0.54e2
-                        * kappa
-                        * x1
-                        * Math.sin(theta)
-                        + 0.6e1
-                        * Math.sqrt(0.6e1 + 0.72e2 * tanLambda * tanLambda * x0 * kappa + 0.81e2
-                                * kappa * kappa * tanLambda * tanLambda * z0 * z0 + 0.72e2
-                                * tanLambda * tanLambda * x0 * x0 * kappa * kappa + 0.36e2
-                                * Math.pow(tanLambda, 0.4e1) * x0 * kappa + 0.36e2 * x0 * kappa
-                                + 0.48e2 * Math.pow(x0, 0.3e1) * Math.pow(kappa, 0.3e1) + 0.72e2
-                                * x0 * x0 * kappa * kappa + 0.6e1 * Math.pow(tanLambda, 0.6e1)
-                                + 0.18e2 * Math.pow(tanLambda, 0.4e1) + 0.18e2 * tanLambda
-                                * tanLambda + 0.72e2 * y1 * y1 * kappa * kappa + 0.81e2 * kappa
-                                * kappa * x1 * x1 + 0.144e3 * y1 * kappa * kappa * Math.sin(theta)
-                                * x1 * Math.cos(theta) * tanLambda * tanLambda + 0.162e3 * kappa
-                                * kappa * y1 * Math.cos(theta) * tanLambda * z1 + 0.288e3 * y1
-                                * Math.pow(kappa, 0.3e1) * Math.sin(theta) * x1 * Math.cos(theta)
-                                * x0 - 0.162e3 * kappa * kappa * y1 * Math.cos(theta) * tanLambda
-                                * z0 - 0.144e3 * x1 * kappa * kappa * Math.cos(theta) * tanLambda
-                                * tanLambda * x0 - 0.162e3 * kappa * kappa * tanLambda * z1 * x1
-                                * Math.sin(theta) + 0.162e3 * kappa * kappa * tanLambda * z0 * x1
-                                * Math.sin(theta) - 0.144e3 * y1 * Math.pow(kappa, 0.3e1)
-                                * Math.sin(theta) * x1 * x1 * Math.pow(Math.cos(theta), 0.2e1)
-                                - 0.144e3 * y1 * kappa * kappa * Math.sin(theta) * tanLambda
-                                * tanLambda * x0 - 0.18e2 * y1 * kappa * kappa * Math.sin(theta)
-                                * x1 * Math.cos(theta) - 0.144e3 * Math.pow(Math.cos(theta), 0.2e1)
-                                * y1 * y1 * Math.pow(kappa, 0.3e1) * x0 + 0.144e3
-                                * Math.pow(Math.cos(theta), 0.3e1) * y1 * y1
-                                * Math.pow(kappa, 0.3e1) * x1 - 0.144e3 * y1 * y1
-                                * Math.pow(kappa, 0.3e1) * x1 * Math.cos(theta) - 0.72e2
-                                * Math.pow(Math.cos(theta), 0.2e1) * y1 * y1 * kappa * kappa
-                                * tanLambda * tanLambda + 0.48e2 * Math.sin(theta)
-                                * Math.pow(y1, 0.3e1) * Math.pow(kappa, 0.3e1)
-                                * Math.pow(Math.cos(theta), 0.2e1) + 0.72e2 * y1 * y1 * kappa
-                                * kappa * tanLambda * tanLambda + 0.81e2 * kappa * kappa
-                                * tanLambda * tanLambda * z1 * z1 - 0.48e2 * Math.pow(x1, 0.3e1)
-                                * Math.pow(kappa, 0.3e1) * Math.pow(Math.cos(theta), 0.3e1) + 0.9e1
-                                * kappa * kappa * y1 * y1 * Math.pow(Math.cos(theta), 0.2e1)
-                                - 0.9e1 * x1 * x1 * kappa * kappa
-                                * Math.pow(Math.cos(theta), 0.2e1) - 0.36e2 * y1 * kappa
-                                * Math.sin(theta) - 0.36e2 * x1 * kappa * Math.cos(theta) + 0.144e3
-                                * y1 * y1 * Math.pow(kappa, 0.3e1) * x0 - 0.48e2 * Math.sin(theta)
-                                * Math.pow(y1, 0.3e1) * Math.pow(kappa, 0.3e1) - 0.144e3 * y1
-                                * kappa * kappa * Math.sin(theta) * x0 - 0.144e3 * x1 * kappa
-                                * kappa * Math.cos(theta) * x0 - 0.36e2 * y1 * kappa
-                                * Math.sin(theta) * Math.pow(tanLambda, 0.4e1) - 0.72e2 * y1
-                                * kappa * Math.sin(theta) * tanLambda * tanLambda - 0.144e3 * y1
-                                * Math.pow(kappa, 0.3e1) * Math.sin(theta) * x0 * x0 - 0.162e3
-                                * kappa * kappa * tanLambda * tanLambda * z0 * z1 - 0.144e3 * x1
-                                * Math.pow(kappa, 0.3e1) * Math.cos(theta) * x0 * x0 - 0.36e2 * x1
-                                * kappa * Math.cos(theta) * Math.pow(tanLambda, 0.4e1) + 0.144e3
-                                * x1 * x1 * Math.pow(kappa, 0.3e1)
-                                * Math.pow(Math.cos(theta), 0.2e1) * x0 + 0.72e2 * x1 * x1 * kappa
-                                * kappa * Math.pow(Math.cos(theta), 0.2e1) * tanLambda * tanLambda
-                                - 0.72e2 * x1 * kappa * Math.cos(theta) * tanLambda * tanLambda),
-                        -0.1e1 / 0.3e1) / kappa / 0.6e1);
-        return result;
-    }
 }

lcsim/src/org/lcsim/util/heprep
ZvVertexConverter.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ZvVertexConverter.java	9 Aug 2005 19:03:03 -0000	1.1
+++ ZvVertexConverter.java	12 Aug 2005 03:09:06 -0000	1.2
@@ -39,7 +39,7 @@
 
         HepRepType typeX = factory.createHepRepType(typeTree, name);
         typeX.addAttValue("layer", LCSimHepRepConverter.PARTICLES_LAYER);
-        typeX.addAttValue("drawAs", "Ellipse");
+        typeX.addAttValue("drawAs", "Point");
         typeX.addAttValue("color", Color.RED);
         typeX.addAttValue("fill", true);
         typeX.addAttValue("fillColor", Color.RED);
CVSspam 0.2.8