1
2
3
4
5
6 package org.lcsim.geometry.subdetector;
7
8 import hep.graphics.heprep.HepRep;
9 import hep.graphics.heprep.HepRepFactory;
10
11 import org.jdom.Element;
12 import org.jdom.JDOMException;
13 import org.lcsim.detector.converter.heprep.DetectorElementToHepRepConverter;
14
15
16
17
18
19 public class PolyhedraBarrelCalorimeter2 extends AbstractPolyhedraCalorimeter
20 {
21 public PolyhedraBarrelCalorimeter2( Element node ) throws JDOMException
22 {
23 super( node );
24
25
26 zlength = node.getChild( "dimensions" ).getAttribute( "z" ).getDoubleValue();
27 outerZ = zlength / 2;
28 innerZ = -outerZ;
29 innerRadius = node.getChild( "dimensions" ).getAttribute( "rmin" ).getDoubleValue();
30 outerRadius = computeBarrelOuterRadius();
31 }
32
33 public boolean isBarrel()
34 {
35 return true;
36 }
37
38 public void appendHepRep( HepRepFactory factory, HepRep heprep )
39 {
40 DetectorElementToHepRepConverter.convert( getDetectorElement(), factory, heprep, 2, false, getVisAttributes().getColor() );
41 }
42 }