Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
HPSEcal.java+8-31.1 -> 1.2
correction to algorithm

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
HPSEcal.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- HPSEcal.java	13 Apr 2011 00:13:10 -0000	1.1
+++ HPSEcal.java	13 Apr 2011 18:11:43 -0000	1.2
@@ -27,7 +27,9 @@
  * defines the number of crystals in Y, on each side of the beamline.
  * 
  * @author Jeremy McCormick
- * @version $Id: HPSEcal.java,v 1.1 2011/04/13 00:13:10 jeremy Exp $
+ * @author Tim Nelson
+ * 
+ * @version $Id: HPSEcal.java,v 1.2 2011/04/13 18:11:43 jeremy Exp $
  */
 public class HPSEcal extends LCDDSubdetector
 {
@@ -98,7 +100,9 @@
         double ycenter = 0;
         double zcorrtot = 0;
         double xcorrtot = 0;
-
+        
+        //double fudgeFactor = .01;
+        
         for (int ix=0; ix<nx; ix++)
         {
             System.out.println("ix="+ix);
@@ -106,8 +110,9 @@
             double thetay = 2*ix*dthetay;
             double zcorr = dx1*(sin(2*ix*dthetay)+sin(2*(ix-1)*dthetay));
             double xcorr = zcorr*tan((2*ix-1)*dthetay);
+            //+ fudgeFactor;
             double xcenter = z0*sin(2*ix*dthetay)+xcorr+xcorrtot;
-            double zcenter = z0*(1-cos(2*ix*dthetay))+zcorr+zcorrtot;
+            double zcenter = z0*(cos(2*ix*dthetay)-1)+zcorr+zcorrtot;
                         
             System.out.println("xcorr="+xcorr);
             System.out.println("xcorrtot="+xcorrtot);
CVSspam 0.2.8