Print

Print


Commit in lcsim/src/org/lcsim/recon/vertexing/zvtop4 on MAIN
.cvsignore+1added 1.1
ZvTop.java+3-21.6 -> 1.7
ZvFitter.java+9-21.10 -> 1.11
+13-4
1 added + 2 modified, total 3 files
end-of-day commit.
Added debug info temporarily.
Todo: Figure out how to deal with IP in the Fitter

lcsim/src/org/lcsim/recon/vertexing/zvtop4
.cvsignore added at 1.1
diff -N .cvsignore
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .cvsignore	29 Jun 2005 00:58:32 -0000	1.1
@@ -0,0 +1 @@
+*.swp

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvTop.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- ZvTop.java	24 Jun 2005 05:39:38 -0000	1.6
+++ ZvTop.java	29 Jun 2005 00:58:32 -0000	1.7
@@ -38,7 +38,7 @@
 public class ZvTop {
     ZvMaximumMatrix maximumMatrix;
     List<ZvTrack> trackList;
-    private ZvFitter vtxFitter = new ZvFitter();
+    private ZvFitter vtxFitter;
     // 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
@@ -120,7 +120,7 @@
      * Calculates the overlap and resolution functions for the tracks
      * @param jetAxisValue
      */
-    public ZvTop(Hep3Vector jetAxisValue) {
+    public ZvTop(Hep3Vector jetAxisValue, ZvFitter f) {
         sigmaT = 0.;
         sigmaL = 0.;
         _jetAxis = jetAxisValue;
@@ -129,6 +129,7 @@
         unresolvedMaximaMap = new HashMap<ZvMaximum, Set<ZvMaximum>>();
         trackList = new ArrayList<ZvTrack>();
         _vertexCandidateList = new ArrayList<Set<ZvMaximum>>();
+        vtxFitter = f;
         return;
     }
       

lcsim/src/org/lcsim/recon/vertexing/zvtop4
ZvFitter.java 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- ZvFitter.java	24 Jun 2005 05:39:38 -0000	1.10
+++ ZvFitter.java	29 Jun 2005 00:58:32 -0000	1.11
@@ -13,6 +13,7 @@
 import java.util.Set;
 
 import org.lcsim.geometry.Detector;
+import org.lcsim.geometry.FieldMap;
 import org.lcsim.spacegeom.CartesianPoint;
 import org.lcsim.spacegeom.SpacePoint;
 import org.lcsim.util.swim.HelixSwim;
@@ -23,7 +24,7 @@
  * Fitter class based on a least squares method
  * 
  * @author W.Walkowiak, 09/18/00
- * @version $Id: ZvFitter.java,v 1.10 2005/06/24 05:39:38 jstrube Exp $
+ * @version $Id: ZvFitter.java,v 1.11 2005/06/29 00:58:32 jstrube Exp $
  */
 
 /* TODO static members only
@@ -55,6 +56,7 @@
 
     // TODO proper constructor;
     public void setDetector(Detector d) {
+        System.out.println("Setting detector to " + d.toString());
         detector = d;
     }
 
@@ -237,7 +239,10 @@
                 
             // create unit vectors
             // TODO Horrible !!!
-            double[] bb = detector.getFieldMap().getField(tDee[i].getCartesianArray());
+            if (detector == null) System.err.println("WARNING!");
+            FieldMap f = detector.getFieldMap();
+            double[] where = tDee[i].getCartesianArray();
+            double[] bb = f.getField(where);
             Hep3Vector vmUnit = unit(new BasicHep3Vector(bb[0], bb[1], bb[2]));
             {
                 Hep3Vector x = unit(track.momentum());
@@ -250,6 +255,8 @@
                 tEta[i] = new BasicHep3Vector(y.x(), y.y(), y.z());
             }
             // get inverse of error matrix
+            
+            System.out.println(new Matrix(track.getErrorMatrix()).toString());
             tHml[i] = (new Matrix(track.getErrorMatrix())).inverse();
 
             // sum for mean position
CVSspam 0.2.8