Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
HPSTracker.java+20-201.6 -> 1.7
set stereo angles for top and bottom independently; set angle for rotation about y-axis

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
HPSTracker.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- HPSTracker.java	16 Feb 2012 23:23:01 -0000	1.6
+++ HPSTracker.java	19 Mar 2012 21:05:31 -0000	1.7
@@ -56,12 +56,7 @@
         {
             reflect = true;
         }
-
-        boolean flipSA = false;
-        if (node.getAttribute("flipSA") != null)
-        {
-            flipSA = node.getAttribute("flipSA").getBooleanValue();
-        }
+    
 
         for (Iterator i = node.getChildren("module").iterator(); i.hasNext();)
         {
@@ -94,12 +89,22 @@
                 double yStart = ringElement.getAttribute("yStart").getDoubleValue();
                 int ny = ringElement.getAttribute("ny").getIntValue();
                 double yStep = ringElement.getAttribute("yStep").getDoubleValue();
-                double phi0 = 0;
-                
-                if (ringElement.getAttribute("phi0") != null)
+                double top_phi0 = 0;                
+                if (ringElement.getAttribute("top_phi0") != null)
                 {
-                    phi0 = ringElement.getAttribute("phi0").getDoubleValue();
+                    top_phi0 = ringElement.getAttribute("top_phi0").getDoubleValue();
                 }
+                 double bot_phi0 = 0;                
+                if (ringElement.getAttribute("bot_phi0") != null)
+                {
+                    bot_phi0 = ringElement.getAttribute("bot_phi0").getDoubleValue();
+                }
+                 double theta = 0;                
+                if (ringElement.getAttribute("theta") != null)
+                {
+                    theta = ringElement.getAttribute("theta").getDoubleValue();
+                }
+                
                 String module = ringElement.getAttributeValue("module");
 
                 Volume moduleVolume = modules.get(module);
@@ -130,11 +135,11 @@
                         System.out.println("module @ " + x + " " + y + " " + z);
                         Rotation rot = new Rotation(moduleBaseName + "_rotation");
                         rot.setX(0);
-                        rot.setY(0);
+                        rot.setY(theta);
                         //rot.setZ(phi0);
                         // Y side along world's X axis.  
                         // FIXME Should phi0 actually be subtracted???
-                        rot.setZ(Math.PI / 2 + phi0); 
+                        rot.setZ(-(Math.PI / 2 + top_phi0)); 
 
                         lcdd.add(p);
                         lcdd.add(rot);
@@ -152,15 +157,10 @@
                             pr.setY(-y);
                             pr.setZ(z + dz);
                             System.out.println("module @ " + x + " " + -y + " " + z + dz);
-                            Rotation rotr = new Rotation(moduleBaseName + "_reflect_rotation");
-                            double rphi0 = phi0;
-                            if (flipSA)
-                                rphi0 = -rphi0;
+                            Rotation rotr = new Rotation(moduleBaseName + "_reflect_rotation");                          
                             rotr.setX(0);
-                            rotr.setY(0);
-                            //rotr.setZ(rphi0);
-                            // FIXME Should rphi0 actually be subtracted?
-                            rotr.setZ(Math.PI/2 + rphi0);
+                            rotr.setY(theta);
+                            rotr.setZ(Math.PI/2 - bot_phi0);
 
                             lcdd.add(pr);
                             lcdd.add(rotr);
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