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