lcsim/src/org/lcsim/util/step
diff -u -r1.5 -r1.6
--- CamKalmanStepper2.java 15 Nov 2008 22:01:29 -0000 1.5
+++ CamKalmanStepper2.java 15 Nov 2008 22:19:10 -0000 1.6
@@ -834,8 +834,8 @@
{
double [] xyz = new double [2];
xyz[0] = r*Math.cos(theta)*Math.cos(phi);
- xyz[1] = r*Math.cos(theta)*Math.cos(phi);
- xyz[2] = r*Math.sin(phi);
+ xyz[1] = r*Math.cos(theta)*Math.sin(phi);
+ xyz[2] = r*Math.sin(theta);
return xyz;
}
/** Cartesian to projective
@@ -845,10 +845,10 @@
{
//*** Determine phi corresponding to this Cartesian coordinate
double phi;
- double r1=r[1]; double r0=r[0];
- phi = Math.atan2(r1, r0);
- if (phi < 0.) phi = phi + 2*Math.PI;
- return(phi);
+ double r1=r[1]; double r0=r[0];
+ phi = Math.atan2(r1, r0);
+ if (phi < 0.) phi = phi + 2*Math.PI;
+ return(phi);
}
public double xyzToTheta(double[] r)