Print

Print


Commit in lcsim/src/org/lcsim/recon/vertexing/zvtop4/fitter on MAIN
VertexFitter.java+231.1 -> 1.2
Started using JAMA internally. Fixes a crash (apparently).

lcsim/src/org/lcsim/recon/vertexing/zvtop4/fitter
VertexFitter.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- VertexFitter.java	20 Mar 2006 07:42:04 -0000	1.1
+++ VertexFitter.java	22 Mar 2006 09:36:27 -0000	1.2
@@ -1,5 +1,9 @@
 package org.lcsim.recon.vertexing.zvtop4.fitter;
 
+/**
+ * @version $Id: VertexFitter.java,v 1.2 2006/03/22 09:36:27 jstrube Exp $
+ */
+
 // Performs a Kalman fit to a list of tracks and returns
 // a Vertex object
 import static java.lang.Math.sin;
@@ -11,6 +15,9 @@
 import static java.lang.Math.PI;
 import static org.lcsim.recon.tracking.trfutil.TRFMath.fmod1;
 
+import Jama.Matrix;
+
+
 public class VertexFitter {
     // the value of the magnetic field in the vicinity of the vertex
     // default is a constant field along the z axis
@@ -430,6 +437,22 @@
     }
 
     private double[] pxmi3(double[] wgt) {
+        double[][] x = new double[3][3];
+        x[0][0] = wgt[0];
+        x[0][1] = wgt[1];
+        x[1][0] = wgt[1];
+        x[0][2] = wgt[2];
+        x[2][0] = wgt[2];
+        x[1][1] = wgt[3];
+        x[1][2] = wgt[4];
+        x[2][1] = wgt[4];
+        x[2][2] = wgt[5];
+        Matrix xMat = new Matrix(x);
+        double[][] y = xMat.inverse().getArray();
+        return new double[] {y[0][0], y[0][1], y[0][2], y[1][1], y[1][2], y[2][2]};
+    }
+    
+    private double[] pxmi3_old(double[] wgt) {
         // ***********************************************************************
         // * *
         // * *
CVSspam 0.2.8