GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.2 -r1.3
--- PolyhedraEndcapCalorimeter3.java 21 Sep 2010 21:59:58 -0000 1.2
+++ PolyhedraEndcapCalorimeter3.java 28 Sep 2010 22:18:41 -0000 1.3
@@ -1,12 +1,11 @@
/**
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: PolyhedraEndcapCalorimeter3.java,v 1.2 2010/09/21 21:59:58 jeremy Exp $
+ * @version $Id: PolyhedraEndcapCalorimeter3.java,v 1.3 2010/09/28 22:18:41 jeremy Exp $
*/
package org.lcsim.geometry.subdetector;
import org.jdom.Element;
import org.jdom.JDOMException;
-import org.lcsim.geometry.Calorimeter;
/**
* @author jeremym
@@ -14,9 +13,41 @@
*/
public class PolyhedraEndcapCalorimeter3 extends AbstractPolyhedraCalorimeter
{
+ double zmin;
+ double zmax;
+
public PolyhedraEndcapCalorimeter3(Element node) throws JDOMException
{
super(node);
+ build(node);
+ }
+
+ private void build(Element node) throws JDOMException
+ {
+ double thickness = getLayering().getThickness();
+ zlength = thickness;
+
+ Element dimensions = node.getChild("dimensions");
+
+ zmin = dimensions.getAttribute("zmin").getDoubleValue();
+ zmax = zmin + thickness;
+
+ irad = dimensions.getAttribute("rmin").getDoubleValue();
+ orad = dimensions.getAttribute("rmax").getDoubleValue();
+ orad = orad * Math.cos(Math.PI / this.nsides);
+
+ // Set layering pre-offset.
+ getLayering().setOffset(zmin);
+ }
+
+ public double getZMin()
+ {
+ return zmin;
+ }
+
+ public double getZMax()
+ {
+ return zmax;
}
public boolean isEndcap()