Commit in lcsim on MAIN
.cvsignore+4-71.4 -> 1.5
src/org/lcsim/recon/vertexing/zvtop4/ZvFitter.java+2-21.9 -> 1.10
                                    /ZvTop.java+22-91.5 -> 1.6
test/org/lcsim/recon/vertexing/zvtop4/ZvTrackTest.java+11-11.1 -> 1.2
+39-19
4 modified files
End-of-day commit Starting to debug and work on fitting

lcsim
.cvsignore 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- .cvsignore	22 Jun 2005 05:25:20 -0000	1.4
+++ .cvsignore	24 Jun 2005 05:39:38 -0000	1.5
@@ -1,12 +1,9 @@
 bin
 .project
 .classpath
+*.slcio
+*.aida
+*.heprep
 doc
 target
-fastmc.aida
-test.slcio
-test.heprep
-mcfast.slcio
-digisim.slcio
-FixedConeRecon.slcio
-NearestNeighborRecon.slcio
+

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvFitter.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- ZvFitter.java	17 May 2005 01:25:27 -0000	1.9
+++ ZvFitter.java	24 Jun 2005 05:39:38 -0000	1.10
@@ -23,7 +23,7 @@
  * Fitter class based on a least squares method
  * 
  * @author W.Walkowiak, 09/18/00
- * @version $Id: ZvFitter.java,v 1.9 2005/05/17 01:25:27 jstrube Exp $
+ * @version $Id: ZvFitter.java,v 1.10 2005/06/24 05:39:38 jstrube Exp $
  */
 
 /* TODO static members only
@@ -113,7 +113,7 @@
     }
 
     public ZvFitStatus doFit(ZvVertex vtx) {
-        return doFit(vtx, new SpacePoint(), new Matrix(0, 0, 0));
+        return doFit(vtx, new SpacePoint(), new Matrix(5, 5));
     }
     /**
      * Fit the vertex.

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvTop.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- ZvTop.java	22 Jun 2005 05:25:21 -0000	1.5
+++ ZvTop.java	24 Jun 2005 05:39:38 -0000	1.6
@@ -38,6 +38,7 @@
 public class ZvTop {
     ZvMaximumMatrix maximumMatrix;
     List<ZvTrack> trackList;
+    private ZvFitter vtxFitter = new ZvFitter();
     // These data members must be final, because changing their values
     // has an effect on many of the other classes
     // Special weight for the IP in the overlap function
@@ -130,10 +131,10 @@
         _vertexCandidateList = new ArrayList<Set<ZvMaximum>>();
         return;
     }
-    
-    // TODO profiling
-    // and could return null instead of throwing a nasty exception
+      
+    // TODO profiling    
     public List<ZvVertex> findVertices(List<Track> list) {
+        trackList.clear();
         System.err.println("entering findVertives\n");
         // empty track to represent IP
         ZvTrack ipTrack = new ZvTrack();
@@ -159,7 +160,7 @@
         return makeVertices();
     }
       
-    // TODO units (mm or cm)?
+    // units are mm
     public double overlap(SpacePoint location) {
         double numerator = 0;
         double denominator = 0;
@@ -276,12 +277,18 @@
      * below a certain cut value.
      * They are assigned from a sorted set of maxima, so that the tracks are
      * always assigned to the vertex with the highest value of V(r), if possible
-     * @return TODO
-     *
+     * @return 
      */
+    // TODO
     private List<ZvVertex> makeVertices() {
         List<ZvVertex> l = new ArrayList<ZvVertex>();
         Set<ZvTrack> unavailableTracks = new HashSet<ZvTrack>();
+        System.err.printf("found %d Candidates\n", _vertexCandidateList.size());
+        // The Maxima are clustered according to the resolution function
+        // A Cluster is a Set of ZvMaxima
+        // Add all tracks from a cluster to the vertex
+        // The vertex decides based on the chiSquared value
+        // which of those tracks it wants to keep
         for (Set<ZvMaximum> i : _vertexCandidateList) {
             ZvVertex iVtx = new ZvVertex(chiSquareCut);
             Set<ZvTrack> iVtxTracks = new HashSet<ZvTrack>();
@@ -296,12 +303,18 @@
                 }
             }
             iVtx.setVtxTracks(iVtxTracks);
+            vtxFitter.doFit(iVtx);
             // TODO fit the vertex, make sure the tracks in the vertex
             // are below the chi2 cut, so that at any time only good tracks are in the
             // vertex
-            if (! iVtx.getFitStatus().isOK())
-                break;
-            unavailableTracks.addAll(iVtx.getVtxTracks());
+            if (! iVtx.getFitStatus().isOK()) {
+                System.err.println("FitStatus not OK");
+                continue;
+            }
+            else {
+                l.add(iVtx);
+                unavailableTracks.addAll(iVtx.getVtxTracks());
+            }
         }
         return l;
     }

lcsim/test/org/lcsim/recon/vertexing/zvtop4
ZvTrackTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ZvTrackTest.java	22 Jun 2005 05:25:20 -0000	1.1
+++ ZvTrackTest.java	24 Jun 2005 05:39:39 -0000	1.2
@@ -1,15 +1,25 @@
 package org.lcsim.recon.vertexing.zvtop4;
 
+import java.io.File;
+
+import org.lcsim.util.loop.LCSimLoop;
+
 import junit.framework.TestCase;
 
 public class ZvTrackTest extends TestCase {
-
+    LCSimLoop loop;
+    File primaryVertexFile;
     protected void setUp() throws Exception {
         super.setUp();
+        loop = new LCSimLoop();
+        // contains psi- mu mu events
+        primaryVertexFile = new File("psiMuMu.slcio");
+        loop.setLCIORecordSource(primaryVertexFile);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
+        loop.dispose();
     }
 
     /*
CVSspam 0.2.8