Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/subdetector on MAIN
CylindricalEndcapCalorimeter.java+9-41.12 -> 1.13
Fixed transformLocalToGlobal() .

GeomConverter/src/org/lcsim/geometry/subdetector
CylindricalEndcapCalorimeter.java 1.12 -> 1.13
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;
CVSspam 0.2.8