Commit in lcsim/src/org/lcsim/fit/helicaltrack on MAIN
HelixUtils.java+13-91.14 -> 1.15
Fixed inconsistency in sign of DCA when computing the point of closest approach and center of circle in Cartesian coordinates for CircleFitter. The functions were using the "standard" L3 Note definitions without considering the sign change of DCA. The main implication is that in the helix fitter these functions are used to calculate the path length for the hits attached to a circle fit. These path lengths are then used in the line fit which is then incorrect. The size of this error will in most cases be small as long as the DCA is small. These functions were only used internally in this same class as far as I can tell.

lcsim/src/org/lcsim/fit/helicaltrack
HelixUtils.java 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- HelixUtils.java	18 Apr 2011 16:05:42 -0000	1.14
+++ HelixUtils.java	18 Oct 2012 15:22:43 -0000	1.15
@@ -7,15 +7,13 @@
 
 package org.lcsim.fit.helicaltrack;
 
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
 import hep.physics.matrix.BasicMatrix;
 import hep.physics.matrix.Matrix;
-
 import hep.physics.matrix.SymmetricMatrix;
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
 import java.util.ArrayList;
 import java.util.List;
-
 import org.lcsim.fit.circle.CircleFit;
 
 /**
@@ -70,7 +68,7 @@
         return PathCalc(xc(cfit), yc(cfit), RC(cfit), x0(cfit), y0(cfit), pos.x(), pos.y());
     }
     
-    /**
+     /**
      * Return the x-y path length from the DCA to a HelicalTrackHit.
      * @param helix HelicalTrackFit to be used in calculating the path length
      * @param hit hit to be used for the path length calculation
@@ -533,19 +531,25 @@
     }
     
     private static double xc(CircleFit cfit) {
-        return cfit.xref() + (RC(cfit) - cfit.dca()) * Math.sin(cfit.phi());
+        //Note that DCA for circle fit has opposite sign w.r.t. the standard L3 definition
+        return cfit.xref() + (RC(cfit) - (-1*cfit.dca())) * Math.sin(cfit.phi());
+        
     }
     
     private static double yc(CircleFit cfit) {
-        return cfit.yref() - (RC(cfit) - cfit.dca()) * Math.cos(cfit.phi());
+        //Note that DCA for circle fit has opposite sign w.r.t. the standard L3 definition
+        return cfit.yref() - (RC(cfit) - (-1*cfit.dca())) * Math.cos(cfit.phi());
+        
     }
     
     private static double x0(CircleFit cfit) {
-        return cfit.xref() - cfit.dca() * Math.sin(cfit.phi());
+        //Note that DCA for circle fit has opposite sign w.r.t. the standard L3 definition
+        return cfit.xref() - (-1*cfit.dca()) * Math.sin(cfit.phi());
     }
     
     private static double y0(CircleFit cfit) {
-        return cfit.yref() + cfit.dca() * Math.cos(cfit.phi());
+        //Note that DCA for circle fit has opposite sign w.r.t. the standard L3 definition
+        return cfit.yref() + (-1*cfit.dca()) * Math.cos(cfit.phi());
     }
 
 }
\ No newline at end of file
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1