GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.12 -r1.13
--- CylindricalEndcapCalorimeter.java 13 Jul 2005 07:51:19 -0000 1.12
+++ CylindricalEndcapCalorimeter.java 13 Jul 2005 23:37:07 -0000 1.13
@@ -61,9 +61,7 @@
/**
* FIXME: This has an implicit assumption that the localPos is that of the layer.
- * FIXME: Will be wrong for negative Z!
- */
-
+ */
public double[] transformLocalToGlobal(double[] localPos)
{
double[] globPos = {localPos[0], localPos[1], localPos[2] };
@@ -71,7 +69,14 @@
if ( gridSeg != null )
{
- globPos[2] += gridSeg.getRadius( gridSeg.getLayer() );
+ globPos[2] += gridSeg.getDistanceToSensitive( gridSeg.getLayer() );
+
+ int ecFlag = gridSeg.getValue("barrel");
+
+ if (ecFlag == 2)
+ {
+ globPos[2] = -globPos[2];
+ }
}
return globPos;