Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util on MAIN
LCDD.java+51-21.29 -> 1.30
allow for optional user definitions of world and tracking fill materials

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util
LCDD.java 1.29 -> 1.30
diff -u -r1.29 -r1.30
--- LCDD.java	19 May 2011 22:05:55 -0000	1.29
+++ LCDD.java	17 Oct 2011 20:21:41 -0000	1.30
@@ -117,11 +117,60 @@
         addContent(fields);
     }
     
+    private final Material getWorldMaterial()
+    {
+        Material m = null;
+        try 
+        {
+            // User-specified fill material.
+            m = this.getMaterial("WorldMaterial");
+        }
+        catch (JDOMException x)
+        {
+            try 
+            {
+                // Default fill material of air.
+                m = this.getMaterial("Air");
+            }
+            catch (JDOMException x2)
+            {
+                // This should not happen!
+                throw new RuntimeException(x);
+            }
+        }
+        return m;
+    }
+    
+    private final Material getTrackingMaterial()
+    {
+        Material m = null;
+        try 
+        {
+            // User-specified fill material.
+            m = this.getMaterial("TrackingMaterial");
+        }
+        catch (JDOMException x)
+        {
+            try 
+            {
+                // Default fill material of air.
+                m = this.getMaterial("Air");
+            }
+            catch (JDOMException x2)
+            {
+                // This should not happen!
+                throw new RuntimeException(x);
+            }
+        }
+        return m;
+    }
+    
     public void cleanUp() throws JDOMException
     {
         Structure structure = getStructure();
         Volume trackingVolume = structure.getTrackingVolume();
-        trackingVolume.setMaterial(getMaterial("Air"));
+        trackingVolume.setMaterial(getTrackingMaterial());
+        
         // Move to end
         structure.removeContent(trackingVolume);
         structure.addContent(trackingVolume);
@@ -133,7 +182,7 @@
         trackingVolume.setRegion(trackingRegion);
         
         Volume worldVolume = structure.getWorldVolume();
-        worldVolume.setMaterial(getMaterial("Air"));
+        worldVolume.setMaterial(getWorldMaterial());
         
         // Move to end
         structure.removeContent(worldVolume);
CVSspam 0.2.8