Commit in GeomConverter/src/org/lcsim/geometry/segmentation on MAIN
CartesianGridXY.java+7-11.12 -> 1.13
CartesianGridXZ.java+51.9 -> 1.10
EcalBarrelCartesianGridXY.java+61.7 -> 1.8
GlobalGridXY.java+51.10 -> 1.11
GridXYZ.java+7-11.31 -> 1.32
MokkaSegmentation.java+8-61.2 -> 1.3
NonprojectiveCylinder.java+61.27 -> 1.28
ProjectiveCylinder.java+61.28 -> 1.29
ProjectiveZPlane.java+7-11.24 -> 1.25
RegularNgonCartesianGridXY.java+61.6 -> 1.7
RegularNgonCartesianGridXZ.java+61.6 -> 1.7
SegmentationBase.java+5-31.13 -> 1.14
+74-12
12 modified files
some work on providing information on segmentation field names; work in progress

GeomConverter/src/org/lcsim/geometry/segmentation
CartesianGridXY.java 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- CartesianGridXY.java	17 Nov 2010 00:13:44 -0000	1.12
+++ CartesianGridXY.java	24 Jan 2013 22:24:20 -0000	1.13
@@ -22,12 +22,14 @@
  * to segment staves in a calorimeter that have box shaped layers. 
  * 
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: CartesianGridXY.java,v 1.12 2010/11/17 00:13:44 jeremy Exp $
+ * @version $Id: CartesianGridXY.java,v 1.13 2013/01/24 22:24:20 jeremy Exp $
  */
 public class CartesianGridXY extends AbstractCartesianGrid
 {
     private int xIndex = -1;
     private int yIndex = -1;
+    
+    private static final String fieldNames[] = {"x", "y"};
 
     public CartesianGridXY(Element node) throws DataConversionException
     {
@@ -53,6 +55,10 @@
             throw new RuntimeException("Missing gridSizeY parameter.");
         }
     }
+    
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
 
     public double getGridSizeX()
     {

GeomConverter/src/org/lcsim/geometry/segmentation
CartesianGridXZ.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- CartesianGridXZ.java	17 Nov 2010 00:13:44 -0000	1.9
+++ CartesianGridXZ.java	24 Jan 2013 22:24:20 -0000	1.10
@@ -26,6 +26,7 @@
 {	
 	private int xIndex = -1;
 	private int zIndex = -1;
+	private static final String[] fieldNames = {"x", "z"};
 	
 	public CartesianGridXZ(Element node) throws DataConversionException
 	{
@@ -51,6 +52,10 @@
 			throw new RuntimeException("Missing gridSizeZ parameter.");
 		}
 	}
+	
+	public String[] getSegmentationFieldNames() {
+	    return fieldNames;
+	}	
 
 	public long[] getNeighbourIDs(int layerRange, int xRange, int zRange)
 	{

GeomConverter/src/org/lcsim/geometry/segmentation
EcalBarrelCartesianGridXY.java 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- EcalBarrelCartesianGridXY.java	17 Nov 2010 00:13:44 -0000	1.7
+++ EcalBarrelCartesianGridXY.java	24 Jan 2013 22:24:20 -0000	1.8
@@ -51,6 +51,8 @@
     private double cscth = 0.;
 
     private int nlayers = 0;
+    
+    private static final String[] fieldNames = {"x", "y"};
 
     public EcalBarrelCartesianGridXY(Element node) throws DataConversionException
     {
@@ -76,6 +78,10 @@
             throw new RuntimeException("Missing gridSizeY parameter.");
         }
     }
+    
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
 
     public long[] getNeighbourIDs(int layerRange, int xRange, int yRange)
     {

GeomConverter/src/org/lcsim/geometry/segmentation
GlobalGridXY.java 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- GlobalGridXY.java	17 Nov 2010 00:13:44 -0000	1.10
+++ GlobalGridXY.java	24 Jan 2013 22:24:20 -0000	1.11
@@ -22,6 +22,7 @@
 {
     private int xIndex = -1;
     private int yIndex = -1;
+    private static final String[] fieldNames = {"x", "y"};
 
     public GlobalGridXY(Element node) throws DataConversionException
     {
@@ -47,6 +48,10 @@
             throw new RuntimeException("Missing gridSizeY parameter.");
         }
     }
+    
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
 
     protected void computePosition()
     {

GeomConverter/src/org/lcsim/geometry/segmentation
GridXYZ.java 1.31 -> 1.32
diff -u -r1.31 -r1.32
--- GridXYZ.java	17 Nov 2010 00:13:44 -0000	1.31
+++ GridXYZ.java	24 Jan 2013 22:24:20 -0000	1.32
@@ -25,7 +25,7 @@
  * 
  * @author Jeremy McCormick <[log in to unmask]>
  * @author Guilherme Lima
- * @version $Id: GridXYZ.java,v 1.31 2010/11/17 00:13:44 jeremy Exp $
+ * @version $Id: GridXYZ.java,v 1.32 2013/01/24 22:24:20 jeremy Exp $
  */
 // FIXME This class needs to be refactored.
 public class GridXYZ extends SegmentationBase
@@ -43,6 +43,8 @@
     private double[] localPosition = { 0, 0, 0 };
 
     private double[] globalPosition = { 0, 0, 0 };
+    
+    private static final String fieldNames[] = {"x", "y", "z"};
 
     /** Creates a new instance of GridXYZ */
     public GridXYZ(Element node) throws DataConversionException
@@ -69,6 +71,10 @@
             this.cellSizes.add(gridSizeZ);
         }
     }
+    
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
 
     public boolean supportsNeighbours()
     {

GeomConverter/src/org/lcsim/geometry/segmentation
MokkaSegmentation.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- MokkaSegmentation.java	18 Apr 2007 00:08:48 -0000	1.2
+++ MokkaSegmentation.java	24 Jan 2013 22:24:20 -0000	1.3
@@ -14,7 +14,6 @@
     public MokkaSegmentation(Element node) throws DataConversionException
     {
         super(node);
-        //System.out.println("MokkaSegmentation");
     }
 
     public void setIDDescription(IDDescriptor id)
@@ -29,14 +28,17 @@
 
     public long[] getNeighbourIDs(int layerRange, int zRange, int phiRange)
     {
-        if ( true )
-            throw new RuntimeException("!!! MokkaSegmentation does not support neighbors !!!");
-        long[] dummy = {0,0,0};
-        return dummy;
+        if (true)
+            throw new RuntimeException("MokkaSegmentation does not support neighbors.");
+        return null;
     }
 
     public long findCellContainingXYZ(double x, double y, double z)
     {
-        throw new RuntimeException("!!! MokkaSegmentation does not support findCellContainingXYZ !!!");
+        throw new RuntimeException(".MokkaSegmentation does not support findCellContainingXYZ.");
+    }
+    
+    public String[] getSegmentationFieldNames() {
+        throw new RuntimeException("I dunno.");
     }
 }
\ No newline at end of file

GeomConverter/src/org/lcsim/geometry/segmentation
NonprojectiveCylinder.java 1.27 -> 1.28
diff -u -r1.27 -r1.28
--- NonprojectiveCylinder.java	17 Nov 2010 00:13:44 -0000	1.27
+++ NonprojectiveCylinder.java	24 Jan 2013 22:24:20 -0000	1.28
@@ -34,6 +34,8 @@
     private int phiIndex;
     private int systemIndex;
     private int barrelIndex;
+    
+    private static final String fieldNames[] = {"gridSizePhi", "gridSizeZ"};
 
     /** Creates a new instance of NonprojectiveCylinder */
     public NonprojectiveCylinder(Element node) throws DataConversionException
@@ -47,6 +49,10 @@
         this.cellSizes.add(1, gridSizeZ);
     }
     
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
+    
     public double getCellSizeU()
     {
         return gridSizeZ;

GeomConverter/src/org/lcsim/geometry/segmentation
ProjectiveCylinder.java 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- ProjectiveCylinder.java	17 Nov 2010 00:13:44 -0000	1.28
+++ ProjectiveCylinder.java	24 Jan 2013 22:24:20 -0000	1.29
@@ -20,6 +20,8 @@
     private int phiIndex;
     private int barrelIndex = -1;
     private int systemIndex = -1;
+    
+    private static final String fieldNames[] = {"phi", "theta"};
 
     ProjectiveCylinder(Element node) throws DataConversionException
     {
@@ -28,6 +30,10 @@
         phiBins = node.getAttribute("phiBins").getIntValue();
     }
     
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
+    
     public double getCellSizeU()
     {
         return getTheta();

GeomConverter/src/org/lcsim/geometry/segmentation
ProjectiveZPlane.java 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- ProjectiveZPlane.java	17 Nov 2010 00:13:44 -0000	1.24
+++ ProjectiveZPlane.java	24 Jan 2013 22:24:20 -0000	1.25
@@ -28,7 +28,9 @@
 
     private double thetaDim = 0;
     private double phiDim = 0;
-
+    
+    private static final String fieldNames[] = {"phi", "theta"};
+    
     ProjectiveZPlane(Element node) throws DataConversionException
     {
         super(node);
@@ -36,6 +38,10 @@
         phiBins = node.getAttribute("phiBins").getIntValue();
     }
     
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
+    
     public double getCellSizeU()
     {
         return thetaDim;

GeomConverter/src/org/lcsim/geometry/segmentation
RegularNgonCartesianGridXY.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- RegularNgonCartesianGridXY.java	17 Nov 2010 00:13:44 -0000	1.6
+++ RegularNgonCartesianGridXY.java	24 Jan 2013 22:24:20 -0000	1.7
@@ -33,6 +33,8 @@
 
     private int[] nvalidx;
     private boolean[] borderCellIsDuplicate;
+    
+    private static final String fieldNames[] = {"x", "y"};
 
 	public RegularNgonCartesianGridXY(Element node) throws DataConversionException
 	{
@@ -59,6 +61,10 @@
 		}
 	}
 	
+	public String[] getSegmentationFieldNames() {
+	    return fieldNames;
+	}
+	
 	public long[] getNeighbourIDs(int layerRange, int xRange, int yRange)
 	{
 		if (this.getDecoder().getID() == 0)

GeomConverter/src/org/lcsim/geometry/segmentation
RegularNgonCartesianGridXZ.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- RegularNgonCartesianGridXZ.java	17 Nov 2010 00:13:44 -0000	1.6
+++ RegularNgonCartesianGridXZ.java	24 Jan 2013 22:24:20 -0000	1.7
@@ -44,6 +44,8 @@
     private double xslope = 0.;
 
     private int ecsign = -1;
+    
+    private static final String fieldNames[] = {"x", "z"};
 
     public RegularNgonCartesianGridXZ(Element node) throws DataConversionException
     {
@@ -69,6 +71,10 @@
             throw new RuntimeException("Missing gridSizeZ parameter.");
         }
     }
+    
+    public String[] getSegmentationFieldNames() {
+        return fieldNames;
+    }
 
     public long[] getNeighbourIDs(int layerRange, int xRange, int zRange)
     {

GeomConverter/src/org/lcsim/geometry/segmentation
SegmentationBase.java 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- SegmentationBase.java	17 Nov 2010 00:13:44 -0000	1.13
+++ SegmentationBase.java	24 Jan 2013 22:24:20 -0000	1.14
@@ -16,13 +16,15 @@
 /**
  * @author jeremym Base implementation of Segmentation.
  */
-public abstract class SegmentationBase 
-extends org.lcsim.geometry.compact.Segmentation
-{   
+public abstract class SegmentationBase extends org.lcsim.geometry.compact.Segmentation
+{
+    
     public SegmentationBase(Element e)
     {
         super(e);
     }
+    
+    public abstract String[] getSegmentationFieldNames();
 
     /**
      * Returns the cell which contains a given point (x,y,z).
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1