Commit in lcsim/src/org/lcsim/contrib/seedtracker/diagnostic on MAIN
FakeHelixFit.java+3-21.1 -> 1.2
CD - fix sign error (maybe?)

lcsim/src/org/lcsim/contrib/seedtracker/diagnostic
FakeHelixFit.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- FakeHelixFit.java	6 May 2008 23:52:00 -0000	1.1
+++ FakeHelixFit.java	2 Jul 2008 22:29:18 -0000	1.2
@@ -32,7 +32,7 @@
             
             //see (12) in http://www-flc.desy.de/lcnotes/notes/LC-DET-2006-004.pdf
             curv = (bfield  * 2.9979258e-4) / pt; //the magic number is c * unit conversion factor... 
-            
+
             //change sign if necessary (i.e. sign of bfield and charge are different)
             if (Math.signum(bfield) != Math.signum(part.getCharge())) 
                 curv *=-1;
@@ -51,13 +51,14 @@
             //calculate dca... should be the x-y distance from the reference point to the center of the circle minus the radius...
             dca = Math.sqrt(xc*xc + yc*yc) - Math.abs(r);
             dca *= Math.signum(curv); //i think that's the correct sign convention in this case...  
-            phi0 = Math.atan2(xc,-yc);
+            phi0 = Math.atan2(xc/(r-dca),-yc/(r-dca));
             
             //calculate z0... first we need the angle (alpha) between the lines connecting the reference point to the center of the circle and the 
             //line connecting the track origin to the center of the circle... 
             
             //x-y distance from origin of the particle to the reference point...
             double s = (phi0 - phi)*r;
+                    
             z0 = o.z() - s*slope; 
         }
             
CVSspam 0.2.8