Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
SiTrackerEndcap.java+9-151.4 -> 1.5
JM: bug fixes for lcdd converter

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
SiTrackerEndcap.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- SiTrackerEndcap.java	29 Oct 2007 20:42:48 -0000	1.4
+++ SiTrackerEndcap.java	29 Oct 2007 21:12:02 -0000	1.5
@@ -74,9 +74,6 @@
             lcdd.add(position);
 
             PhysVol layerPV = new PhysVol(layerVolume, lcdd.getTrackingVolume(), position, rotation);
-
-            // DEBUG
-            break;
         }
     }
 
@@ -132,15 +129,12 @@
             p.setY(y);
             Rotation rot = new Rotation(wedgeName + i + "_rotation");
             rot.setX(-Math.PI/2);
-            rot.setY(Math.PI/2 - phi);
+            rot.setY(-Math.PI/2 - phi);
 
             lcdd.add(p);
             lcdd.add(rot);
 
             new PhysVol(wedgeLV, layerLV, p, rot);
-
-            // DEBUG
-            break;
         }
 
         return layerLV;
@@ -274,21 +268,22 @@
             double xmax = xmin+2*xsize_box;
 
             for (int ibox = 0; ibox < nboxes; ibox++)
-            {
-                System.out.println(ibox);
-                
+            {   
                 double xcenter = (xmin+xmax)/2;
                 xmin += 2*xsize_box;
                 xmax += 2*xsize_box;
 
                 String sliceName = subdetElement.getAttributeValue("name") + "_layer" + layerN + "_module" + imodule;
 
+                // FIXME: Multiply by 2 to conform to GDML convention of dividing inputs by 2.
                 Box sliceBox = new Box(sliceName + "_box");
-                sliceBox.setX(xsize_box);
-                sliceBox.setY(dy);
-                sliceBox.setZ(zsizes.get(i));
+                sliceBox.setX(xsize_box*2);
+                sliceBox.setY(dy*2);
+                sliceBox.setZ(zsizes.get(i)*2);
+                lcdd.add(sliceBox);
 
                 Volume sliceLV = new Volume(sliceName, sliceBox, sliceMaterial);
+                lcdd.add(sliceLV);
 
                 Position p = new Position(sliceName + "_position");
                 p.setX(xcenter);
@@ -306,7 +301,6 @@
                 imodule++;
             }
 
-            
             // Small symmetric trapezoids
             if (ntraps == 1)
             {
@@ -373,7 +367,7 @@
 
                     imodule++;
                 }
-            }   
+            }
         }
     }
 }
\ No newline at end of file
CVSspam 0.2.8