1 package org.lcsim.geometry.subdetector;
2
3 import org.jdom.Element;
4 import org.jdom.JDOMException;
5
6
7
8
9
10 public class PolyhedraEndcapCalorimeter3 extends AbstractPolyhedraCalorimeter
11 {
12 double zmin;
13 double zmax;
14
15 public PolyhedraEndcapCalorimeter3( Element node ) throws JDOMException
16 {
17 super( node );
18 build( node );
19 }
20
21 private void build( Element node ) throws JDOMException
22 {
23 Element dimensions = node.getChild( "dimensions" );
24
25 System.out.println(getName());
26
27 innerZ = dimensions.getAttribute( "zmin" ).getDoubleValue();
28 outerZ = innerZ + getLayering().getThickness();
29 zlength = outerZ - innerZ;
30
31 innerRadius = dimensions.getAttribute( "rmin" ).getDoubleValue();
32 outerRadius = dimensions.getAttribute( "rmax" ).getDoubleValue();
33 outerRadius = outerRadius * Math.cos( Math.PI / nsides );
34
35
36 getLayering().setOffset( innerZ );
37 }
38
39 public boolean isEndcap()
40 {
41 return true;
42 }
43 }