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
10
11
12
13
14
15
16 abstract class AbstractCalorimeter extends AbstractLayeredSubdetector implements Calorimeter
17 {
18
19 CalorimeterType calorimeterType = CalorimeterType.UNKNOWN;
20
21
22 protected double innerRadius;
23 protected double outerRadius;
24 protected double innerZ;
25 protected double outerZ;
26 protected double zlength;
27 protected double sectionPhi;
28 protected int nsides;
29
30 public AbstractCalorimeter( Element node ) throws JDOMException
31 {
32 super( node );
33
34
35 if ( node.getAttribute( "calorimeterType" ) != null )
36 {
37 calorimeterType = CalorimeterType.fromString( node.getAttributeValue( "calorimeterType" ) );
38 }
39 }
40
41
42
43
44
45 public CalorimeterType getCalorimeterType()
46 {
47 return calorimeterType;
48 }
49
50
51
52
53
54 public boolean isCalorimeter()
55 {
56 return true;
57 }
58
59 public double getTotalThickness()
60 {
61 return layering.getThickness();
62 }
63
64
65
66
67
68 public double getCellSizeU()
69 {
70 return ( ( Segmentation ) this.getIDDecoder() ).getCellSizeU();
71 }
72
73
74
75
76
77 public double getCellSizeV()
78 {
79 return ( ( Segmentation ) this.getIDDecoder() ).getCellSizeV();
80 }
81 }