GeomConverter/src/org/lcsim/geometry/segmentation
diff -u -r1.6 -r1.6.2.1
--- SegmentationBase.java 18 Jul 2005 18:00:05 -0000 1.6
+++ SegmentationBase.java 28 Sep 2005 00:13:13 -0000 1.6.2.1
@@ -6,20 +6,40 @@
package org.lcsim.geometry.segmentation;
+import org.lcsim.geometry.Layered;
import org.jdom.Element;
/**
* @author jeremym
*
- * Base implementation of segmentation
+ * Base implementation of segmentation
*
* FIXME: Nothing to do here?
*
*/
public class SegmentationBase extends org.lcsim.geometry.compact.Segmentation
-{
+{
public SegmentationBase(Element e)
{
super(e);
- }
+ }
+
+ /**
+ * FIXME: Should be renamed as it is actually returning the distance to the
+ * midpoint of the sensitive layer.
+ *
+ * FIXME: Does this belong here? It is only used by CylindricalEndcapCalorimeter.
+ */
+ public double getDistanceToSensitive(int layer)
+ {
+ return ((Layered)detector).getLayering().getDistanceToLayerSensorMid(layer);
+ }
+
+ /*
+ * FIXME: Does this belong here?
+ */
+ protected int getNumberOfLayers()
+ {
+ return ((Layered)detector).getLayering().getLayerCount();
+ }
}
\ No newline at end of file