Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd on MAIN
PolyhedraEndcapCalorimeter.java+5-61.24 -> 1.25
rmax recalc

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
PolyhedraEndcapCalorimeter.java 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- PolyhedraEndcapCalorimeter.java	13 Feb 2009 09:47:49 -0000	1.24
+++ PolyhedraEndcapCalorimeter.java	6 May 2010 18:27:46 -0000	1.25
@@ -84,13 +84,12 @@
         double zmin = dimensions.getAttribute("zmin").getDoubleValue();
         double rmin = dimensions.getAttribute("rmin").getDoubleValue();
         double rmax = dimensions.getAttribute("rmax").getDoubleValue();
+                
         int numsides = dimensions.getAttribute("numsides").getIntValue();
-
-        // Rotation of polyhedra into correct frame.
-        //double zrot = Math.PI / numsides;
-        //Rotation envelopeRotation = new Rotation(detName + "_rotation");
-        //envelopeRotation.setZ(zrot);
-        //define.addRotation(envelopeRotation);
+        
+        // Geant4 interprets rmax as the distance to the polygonal flat.
+        // we want to interpret this as the distance to the point.
+        rmax = rmax*Math.cos(Math.PI/numsides);
 
         LayerStack layers = Layering.makeLayering(this.node).getLayerStack();
         
CVSspam 0.2.8