GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
diff -u -r1.17 -r1.18
--- EcalBarrel.java 2 Jun 2008 20:37:00 -0000 1.17
+++ EcalBarrel.java 29 Jan 2009 21:00:32 -0000 1.18
@@ -35,7 +35,7 @@
* that is similar to the "ecal02" subdetector in the Mokka database.
*
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: EcalBarrel.java,v 1.17 2008/06/02 20:37:00 jeremy Exp $
+ * @version $Id: EcalBarrel.java,v 1.18 2009/01/29 21:00:32 jeremy Exp $
*/
public class EcalBarrel extends LCDDSubdetector
{
@@ -48,7 +48,8 @@
// layers and slices. Because these are half
// measurements it results in a 2 micron tolerance
// for these components.
- private double tolerance=0.001;
+ //private double tolerance=0.001;
+ private double tolerance=0.0;
EcalBarrel(Element node) throws JDOMException
{
@@ -151,11 +152,11 @@
// Create the trapezoid for the stave.
Trapezoid module_trd = LCDDFactory.createTrapezoid(
name + "_module_trd",
- module_x1-tolerance, // Outer side, i.e. the "short" X side.
- module_x2-tolerance, // Inner side, i.e. the "long" X side.
- module_y1-tolerance, // Corresponds to subdetector (or module) Z.
- module_y2-tolerance, // "
- module_z-tolerance); // Thickness, in Y for top stave, when rotated.
+ module_x1/2-tolerance, // Outer side, i.e. the "short" X side.
+ module_x2/2-tolerance, // Inner side, i.e. the "long" X side.
+ module_y1/2-tolerance, // Corresponds to subdetector (or module) Z.
+ module_y2/2-tolerance, // "
+ module_z/2-tolerance); // Thickness, in Y for top stave, when rotated.
lcdd.add(module_trd);
// Create the logical volume for the stave.
@@ -184,7 +185,8 @@
try
{
buildBarrelStave(lcdd, this, sens, module_volume);
- } catch (Exception e)
+ }
+ catch (Exception e)
{
throw new RuntimeException("Failed to build layers into "
+ module_volume.getVolumeName(), e);
@@ -232,9 +234,8 @@
envelopeVolume.addPhysVol(pv);
// increment phi
- phi += dphi;
+ phi += dphi;
}
-
// Set region, limitset, and vis.
setVisAttributes(lcdd, node, envelopeVolume);
@@ -345,13 +346,13 @@
lcdd.add(layer_position);
// Compute the X dimension for this layer.
- double xcut = (layer_thickness / tan_beta) * 2;
+ double xcut = (layer_thickness / tan_beta);
layer_dim_x -= xcut;
// Box of the layer.
Box layer_box = LCDDFactory.createBox(layer_name + "_box",
- layer_dim_x - tolerance,
- z - tolerance,
+ layer_dim_x*2 - tolerance,
+ z*2 - tolerance,
layer_thickness - tolerance);
lcdd.add(layer_box);
@@ -387,8 +388,8 @@
// Box of slice.
Box slice_box = LCDDFactory.createBox(slice_name + "_box",
- layer_dim_x - tolerance,
- z - tolerance,
+ layer_dim_x*2 - tolerance,
+ z*2 - tolerance,
slice_thickness - tolerance);
lcdd.add(slice_box);