Print

Print


Commit in lcsim/src/org/lcsim/recon/vertexing/zvtop4 on MAIN
ZvTop.java+3-31.16 -> 1.17
ZvMaximum.java+12-11.2 -> 1.3
+15-4
2 modified files
some bugfixes

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvTop.java 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- ZvTop.java	31 Aug 2005 07:39:20 -0000	1.16
+++ ZvTop.java	9 Sep 2005 00:12:02 -0000	1.17
@@ -159,7 +159,7 @@
      */
     public List<ZvVertex> findVertices(List<Track> list) {
         trackList.clear();
-        System.err.println("entering findVertives\n");
+        System.err.printf("entering findVertives with %d Tracks\n", list.size());
         // FIXME Put in IP as constraint. At the moment, no vertex contains IP
         for (Track iTrack : list) {
             trackList.add(new ZvTrack(iTrack));
@@ -229,12 +229,12 @@
      *         otherwise
      */
     public boolean areResolved(SpacePoint sp1, SpacePoint sp2) {
-        double minOverlap = 0;
+        double minOverlap = 2000;
         // TODO conversion SpacePoint Hep3Vector :-(
         Hep3Vector vec = subtract(sp2, sp1);
         Hep3Vector toSp1 = new BasicHep3Vector(sp1.x(), sp1.y(), sp1.z());
         for (int i = 1; i < iterationMax; ++i) {
-            Hep3Vector rVec = add(toSp1, multiply(vec, i / 3000));
+            Hep3Vector rVec = add(toSp1, multiply(vec, i / iterationMax));
             SpacePoint r = new CartesianPoint(rVec.x(), rVec.y(), rVec.z());
             double overlap = overlap(r);
             if (overlap < minOverlap)

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvMaximum.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ZvMaximum.java	1 Aug 2005 18:09:50 -0000	1.2
+++ ZvMaximum.java	9 Sep 2005 00:12:02 -0000	1.3
@@ -12,7 +12,7 @@
  * @author jstrube
  *
  */
-class ZvMaximum {
+class ZvMaximum implements Comparable {
     private ZvTrack _track_i;
     private ZvTrack _track_j;
     private SpacePoint _location;
@@ -51,4 +51,15 @@
     public ZvTrack getTrack_j() {
         return _track_j;
     }
+    
+    public int compareTo(Object o) {
+        if (o.getClass() != ZvMaximum.class)
+            throw new IllegalArgumentException("Can only compare ZvMaximum Objects");
+        ZvMaximum max2 = (ZvMaximum) o;
+        if (_value > max2._value)
+            return 1;
+        if (_value < max2._value)
+            return -1;
+        return 0;
+    }
 }
CVSspam 0.2.8