Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
SiTrackerEndcap.java+17-21.5 -> 1.6
JM: add reflect endcap to lcdd cnv

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
SiTrackerEndcap.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- SiTrackerEndcap.java	29 Oct 2007 21:12:02 -0000	1.5
+++ SiTrackerEndcap.java	29 Oct 2007 22:21:54 -0000	1.6
@@ -73,7 +73,17 @@
             lcdd.add(rotation);
             lcdd.add(position);
 
-            PhysVol layerPV = new PhysVol(layerVolume, lcdd.getTrackingVolume(), position, rotation);
+            // Positive endcap.
+            new PhysVol(layerVolume, lcdd.getTrackingVolume(), position, rotation);
+            
+            // Negative endcap.
+            Rotation rotationReflect = new Rotation(layerName + "_rotation_reflect");
+            rotationReflect.setY(Math.PI);
+            Position positionReflect = new Position(layerName + "_position_negative");
+            positionReflect.setZ(-layerZ);
+            lcdd.add(rotationReflect);
+            lcdd.add(positionReflect);
+            new PhysVol(layerVolume, lcdd.getTrackingVolume(), positionReflect, rotationReflect);
         }
     }
 
@@ -113,7 +123,6 @@
         Volume layerLV = new Volume(layerName, layerTube, material);        
 
         Volume wedgeLV = makeWedge(subdetElement, layerElement, innerR, outerR, thickness, nwedges, layerN, lcdd);
-
         lcdd.add(wedgeLV);
 
         double r = (innerR + outerR) / 2;
@@ -137,6 +146,12 @@
             new PhysVol(wedgeLV, layerLV, p, rot);
         }
 
+        // Set the layer envelope to invisible to help Geant4 visualization.
+        if (lcdd.getVisAttributes("InvisibleWithDaughters") != null)
+        {
+            layerLV.setVisAttributes(lcdd.getVisAttributes("InvisibleWithDaughters"));
+        }
+        
         return layerLV;
     }
 
CVSspam 0.2.8