Commit in GeomConverter on MAIN
src/org/lcsim/geometry/compact/CompactReader.java+23-121.28 -> 1.29
test/org/lcsim/geometry/subdetector/ScalingTest.java+3-11.1 -> 1.2
+26-13
2 modified files
JM: Remove subdetector scaling variables until can rework the design with Tony.

GeomConverter/src/org/lcsim/geometry/compact
CompactReader.java 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- CompactReader.java	8 Mar 2007 20:04:38 -0000	1.28
+++ CompactReader.java	8 Mar 2007 22:28:52 -0000	1.29
@@ -11,11 +11,9 @@
 import org.jdom.Element;
 import org.jdom.JDOMException;
 import org.jdom.input.SAXBuilder;
-import org.lcsim.geometry.layer.Layering;
 import org.lcsim.geometry.subdetector.CylindricalBarrelCalorimeter;
 import org.lcsim.geometry.subdetector.CylindricalEndcapCalorimeter;
-import org.lcsim.geometry.subdetector.DiskTracker;
-import org.lcsim.geometry.subdetector.MultiLayerTracker;
+import org.lcsim.geometry.subdetector.PolyhedraBarrelCalorimeter;
 import org.lcsim.material.XMLMaterialManager;
 import org.lcsim.units.clhep.SystemOfUnitsMap;
 import org.lcsim.util.cache.CachingEntityResolver;
@@ -31,7 +29,7 @@
  * org.lcsim.geometry.GeometryReader class, which extends this.
  *
  * @author tonyj
- * @version $Id: CompactReader.java,v 1.28 2007/03/08 20:04:38 jeremy Exp $
+ * @version $Id: CompactReader.java,v 1.29 2007/03/08 22:28:52 jeremy Exp $
  *
  */
 public class CompactReader
@@ -207,7 +205,7 @@
             
             det.addSubdetector(sub);
             
-            setupScalingVariables(expr, sub);
+            //setupScalingVariables(expr, sub);
         }
     }
     
@@ -284,9 +282,12 @@
      * @param expr
      * @param subdet
      */
-    private void setupScalingVariables(JDOMExpressionFactory expr, Subdetector subdet)
+    /*private void setupScalingVariables(JDOMExpressionFactory expr, Subdetector subdet)
     {
+    	System.out.println("subdet <" + subdet.getName() + "> is type <" + subdet.getClass().getCanonicalName() +">");
+    	
     	// Get the layering.
+    	
     	Layering layering=null;
     	try {
     		layering = subdet.getLayering();
@@ -302,28 +303,38 @@
     		return;
     	}
     	
+    	
     	//System.out.println("Computing scaling variables for " + subdet.getName());
     	    	    	
     	// Compute total thickness from layers.
-    	double totalLayerThickness = layering.getThickness();
-    	String name = subdet.getName() + "_total_thickness";
+    	//double totalLayerThickness = layering.getThickness();
+    	//String name = subdet.getName() + "_total_thickness";
+    	String name = subdet.getName();
     	    	
     	// Add to JDOMExpressionFactory.
-    	expr.addConstant(name, totalLayerThickness);
+    	//expr.addConstant(name, totalLayerThickness);
     	    
     	// Handle specific subtypes here.
     	if ( subdet instanceof CylindricalBarrelCalorimeter )
     	{
     		CylindricalBarrelCalorimeter cal = (CylindricalBarrelCalorimeter)subdet;
     		double outerRadius = cal.getOuterRadius();
-    		expr.addConstant(cal.getName() + "_outer_r", outerRadius);
+    		double innerRadius = cal.getInnerRadius();
+    		expr.addConstant(name + "_outer_r", outerRadius);
+    		expr.addConstant(name + "_total_thickess", outerRadius - innerRadius);
     	}
     	else if ( subdet instanceof CylindricalEndcapCalorimeter )
     	{
     		CylindricalEndcapCalorimeter cal = (CylindricalEndcapCalorimeter)subdet;
     		double zmax = cal.getZMax();
-    		expr.addConstant(cal.getName() + "_outer_z", zmax);
+    		double zmin = cal.getZMin();
+    		expr.addConstant(name + "_outer_z", zmax);
+    		expr.addConstant(name + "_total_thickness", zmax - zmin);    		
     	}
+    	else {
+    		System.out.println("no scaling variables set for <" + name + ">");
+    	}
+    	
     	else if ( subdet instanceof MultiLayerTracker )
     	{
     		MultiLayerTracker tkr = (MultiLayerTracker)subdet;
@@ -338,5 +349,5 @@
     		double zmax = tkr.getLayering().getDistanceToLayerBack(l.getNumberOfLayers()-1);
     		expr.addConstant(tkr.getName() + "_outer_z", zmax);
     	}
-    }
+    }*/
 }
\ No newline at end of file

GeomConverter/test/org/lcsim/geometry/subdetector
ScalingTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ScalingTest.java	8 Mar 2007 20:04:38 -0000	1.1
+++ ScalingTest.java	8 Mar 2007 22:28:53 -0000	1.2
@@ -25,11 +25,13 @@
     
     protected void setUp() throws java.lang.Exception
     {
+    	/*
         InputStream in = 
         	this.getClass().getResourceAsStream("/org/lcsim/geometry/subdetector/ScalingTest.xml");        
         GeometryReader reader = new GeometryReader();
         Detector det = reader.read(in);                  
         return;
+        */
     }
     
     public static junit.framework.Test suite()
@@ -39,6 +41,6 @@
     
     public void testScaling()
     {
-    	System.out.println("testScaling");
+    	//System.out.println("testScaling");
     }    
 }
\ No newline at end of file
CVSspam 0.2.8