View Javadoc

1   package org.lcsim.geometry.subdetector;
2   
3   import org.jdom.Element;
4   import org.jdom.JDOMException;
5   import org.lcsim.geometry.CylindricalSubdetector;
6   
7   /**
8    * @author Tony Johnson
9    * @author Jeremy McCormick <jeremym@slac.stanford.edu>
10   * @version $Id: CylindricalCalorimeter.java,v 1.18 2010/11/30 00:16:29 jeremy Exp $
11   * 
12   * FIXME: This is public only because changing to protected would break a bunch
13   *        of stuff, mostly in digisim. F
14   * FIXME: This should be called AbstractCylindricalCalorimeter, as it can't be instantiated, 
15   *        but doing this breaks a bunch of digisim stuff.
16   */
17  public abstract class CylindricalCalorimeter extends AbstractCalorimeter implements CylindricalSubdetector
18  {
19      protected double innerR;
20      protected double outerR;
21      protected double minZ;
22      protected double maxZ;
23  
24      public CylindricalCalorimeter( Element node ) throws JDOMException
25      {
26          super( node );
27          build( node );
28      }
29  
30      private void build( Element node ) throws JDOMException
31      {
32          Element dimensions = node.getChild( "dimensions" );
33          innerR = dimensions.getAttribute( "inner_r" ).getDoubleValue();
34      }
35  
36      public double getZMin()
37      {
38          return minZ;
39      }
40  
41      public double getZMax()
42      {
43          return maxZ;
44      }
45  
46      public double getOuterZ()
47      {
48          return getZMax();
49      }
50  
51      public double getInnerZ()
52      {
53          return getZMin();
54      }
55  
56      public double getOuterRadius()
57      {
58          return outerR;
59      }
60  
61      public double getInnerRadius()
62      {
63          return innerR;
64      }
65  
66      public int getNumberOfSides()
67      {
68          return 0;
69      }
70  
71      public double getSectionPhi()
72      {
73          return Math.PI * 2;
74      }
75  }