Commit in lcsim/src/org/lcsim/fit/helicaltrack on MAIN
HelicalTrack2DHit.java+18-631.5 -> 1.6
HelicalTrackFitter.java+2-331.28 -> 1.29
+20-96
2 modified files
Minor updates

lcsim/src/org/lcsim/fit/helicaltrack
HelicalTrack2DHit.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- HelicalTrack2DHit.java	2 Jul 2008 23:54:24 -0000	1.5
+++ HelicalTrack2DHit.java	10 Jan 2009 01:20:15 -0000	1.6
@@ -11,6 +11,7 @@
 import hep.physics.vec.Hep3Vector;
 
 import java.util.List;
+
 import org.lcsim.geometry.subdetector.BarrelEndcapFlag;
 
 /**
@@ -21,77 +22,31 @@
  * @version 1.0
  */
 public class HelicalTrack2DHit  extends HelicalTrackHit {
-//    private HelicalTrackStrip _strip;
     private double _zmin;
     private double _zmax;
     private static int _type = 2;
     
     /**
-     * Create a HelicalTrack2DHit from a TrackerHit and the z coordinates of strip
-     * endpoints.
-     * @param hit corresponding TrackerHit
-     * @param zmin minimum value of z for this hit
-     * @param zmax maximum value of z for this hit
-     */
-//    public HelicalTrack2DHit(TrackerHit hit, double zmin, double zmax) {
-//        super(hit);
-//        _zmin = zmin;
-//        _zmax = zmax;
-//    }
-    
-    /**
      * Create a HelicalTrack2DHit from the associated TrackerHit and HelicalTrackStrip.
-     * @param hit TrackerHit associated with this hit
-     * @param strip HelicalTrackStrip associated with this hit
+     * @param pos location of the strip center
+     * @param cov covariance matrix for the hit
+     * @param dEdx deposited energy
+     * @param time hit time
+     * @param rawhits list of raw hits
+     * @param zmin minimum z for the strip
+     * @param zmax maximum z for the strip
+     * @param detname detector name
+     * @param layer layer number
+     * @param beflag
      */
     public HelicalTrack2DHit(Hep3Vector pos, SymmetricMatrix cov, double dEdx, double time,
             List rawhits, String detname, int layer, BarrelEndcapFlag beflag, double zmin, double zmax) {
         super(pos, cov, dEdx, time, _type, rawhits, detname, layer, beflag);
-        //  Save the strip information
-//        _strip = strip;
         _zmin = zmin;
-        _zmax = zmax;
-        
-        //  Check that strip is parallel to the z axis within the hit uncertainty
-//        double vx = _strip.v().x();
-//        double vy = _strip.v().y();
-//        double maxtilt = _strip.du() / (_strip.vmax()-_strip.vmin());
-//        if (vx*vx + vy*vy > maxtilt*maxtilt) throw new RuntimeException("Tried to construct a HelicalTrack2DHit from a non-axial strip");
-        
+        _zmax = zmax;        
     }
     
     /**
-     * Create a HelicalTrack2DHit from scratch without reference to an existing
-     * TrackerHit.
-     * @param x x coordinate
-     * @param y y coordinate
-     * @param z z coordinate
-     * @param drphi uncertainty in the r*phi coordinate
-     * @param zmin minimum z coordinate
-     * @param zmax maximum z coordinate
-     */
-//    public HelicalTrack2DHit(double x, double y, double z, double drphi, double zmin, double zmax) {
-//        super (x, y, z, drphi, Math.abs(zmax-zmin) / Math.sqrt(12));
-//        _zmin = zmin;
-//        _zmax = zmax;
-//    }
-    
-    /**
-     * Create a HelicalTrack2DHit from a TrackerHit overriding the position and
-     * covariance matrix in the existing TrackerHit.
-     * @param hit TrackerHit associated with this hit
-     * @param pos hit position
-     * @param cov covariance matrix
-     * @param zmin minimum z
-     * @param zmax maximum z
-     */
-//    public HelicalTrack2DHit(TrackerHit hit, Hep3Vector pos, SymmetricMatrix cov, double zmin, double zmax) {
-//        super(hit, pos, cov);
-//        _zmin = zmin;
-//        _zmax = zmax;
-//    }
-    
-    /**
      * Return the minimum z coordinate.
      * @return minimum z coordinate
      */
@@ -106,12 +61,12 @@
     public double zmax() {
         return _zmax;
     }
-    
+
     /**
-     * Return the HelicalTrackStrip associated with this hit.
-     * @return HelicalTrackStrip associated with this hit
+     * Return the length of the strip along the z direction.
+     * @return strip length
      */
-//    public HelicalTrackStrip strip() {
-//        return _strip;
-//    }
+    public double zlen() {
+        return _zmax - _zmin;
+    }
 }
\ No newline at end of file

lcsim/src/org/lcsim/fit/helicaltrack
HelicalTrackFitter.java 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- HelicalTrackFitter.java	24 Oct 2008 21:29:20 -0000	1.28
+++ HelicalTrackFitter.java	10 Jan 2009 01:20:15 -0000	1.29
@@ -4,7 +4,7 @@
  *
  * Created on March 25, 2006, 6:11 PM
  *
- * $Id: HelicalTrackFitter.java,v 1.28 2008/10/24 21:29:20 partridge Exp $
+ * $Id: HelicalTrackFitter.java,v 1.29 2009/01/10 01:20:15 partridge Exp $
  */
 
 import hep.physics.matrix.SymmetricMatrix;
@@ -12,7 +12,6 @@
 import hep.physics.vec.Hep3Vector;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -265,23 +264,7 @@
                 //  Save the line fit, chi^2, and DOF
                 _lfit = _lfitter.getFit();
                 chisq[1] = _lfit.chisquared();
-                ndof[1] = npix - 2;
-                
-                
-//                 if (Double.isNaN(_lfit.intercept())){
-//                    System.out.println("z0 is NaN"); 
-//                    System.out.println("Pixel hits: "+pixel_hits.size());
-//                    System.out.println(Arrays.toString(dz)); 
-//                    int ncross = 0; 
-//                    for (HelicalTrackHit hth : pixel_hits){
-//                        if (hth instanceof HelicalTrackCross){
-//                            ncross++; 
-//                        }
-//                    }
-//                    System.out.println("Cross hits: "+ncross);
-//                    
-//                }
-                
+                ndof[1] = npix - 2;              
                 
                 //  Save the line fit parameters
                 par[HelicalTrackFit.z0Index] = _lfit.intercept();
@@ -333,20 +316,6 @@
                 chisq[1] = 0.;
                 ndof[1] = 0;
                 
-//                if (Double.isNaN(_zfit.getCentroid()[0])){
-//                    System.out.println("z0 is NaN"); 
-//                    System.out.println("Pixel hits: "+pixel_hits.size());
-//                    System.out.println(" hits: "+pixel_hits.size());
-//                    int ncross = 0; 
-//                    for (HelicalTrackHit hth : pixel_hits){
-//                        if (hth instanceof HelicalTrackCross){
-//                            ncross++; 
-//                        }
-//                    }
-//                    System.out.println("Cross hits: "+ncross);
-//                    
-//                }
-                
                 //  Save the ZSegment fit parameters
                 par[HelicalTrackFit.z0Index] = _zfit.getCentroid()[0];
                 par[HelicalTrackFit.slopeIndex] = _zfit.getCentroid()[1];
CVSspam 0.2.8