View Javadoc

1   package org.lcsim.geometry.subdetector;
2   
3   import org.jdom.Element;
4   import org.jdom.JDOMException;
5   import org.lcsim.geometry.Calorimeter;
6   import org.lcsim.geometry.compact.Segmentation;
7   
8   /**
9    * @author Jeremy McCormick <jeremym@slac.stanford.edu>
10   * @version $Id: TestBeamCalorimeter.java,v 1.13 2011/01/04 21:58:51 jeremy Exp $
11   */
12  // TODO Need to make this class inherit from AbstractCalorimeter.
13  public class TestBeamCalorimeter extends AbstractTestBeam implements Calorimeter {
14  
15      CalorimeterType calType = CalorimeterType.UNKNOWN;
16  
17      public TestBeamCalorimeter(Element node) throws JDOMException {
18          super(node);
19          if (node.getAttribute("calorimeterType") != null) {
20              calType = CalorimeterType.fromString(node.getAttributeValue("calorimeterType"));
21          }
22      }
23  
24      // FIXME Duplicate implementation w.r.t. AbstractCalorimeter.
25      public boolean isCalorimeter() {
26          return true;
27      }
28  
29      // FIXME Duplicate implementation w.r.t. AbstractCalorimeter.
30      public CalorimeterType getCalorimeterType() {
31          return calType;
32      }
33  
34      // FIXME Duplicate implementation w.r.t. AbstractCalorimeter.
35      public double getCellSizeU() {
36          return ((Segmentation) this.getIDDecoder()).getCellSizeU();
37      }
38  
39      // FIXME Duplicate implementation w.r.t. AbstractCalorimeter.
40      public double getCellSizeV() {
41          return ((Segmentation) this.getIDDecoder()).getCellSizeV();
42      }
43  
44      public double getSectionPhi() {
45          return 0;
46      }
47  
48      // FIXME Duplicate implementation w.r.t. AbstractCalorimeter.
49      public double getTotalThickness() {
50          return layering.getThickness();
51      }
52  }