Commit in GeomConverter/test/org/lcsim/detector on MAIN
SimpleDetectorTest.java+19-161.2 -> 1.3
JM: fix build

GeomConverter/test/org/lcsim/detector
SimpleDetectorTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- SimpleDetectorTest.java	3 Mar 2007 13:34:01 -0000	1.2
+++ SimpleDetectorTest.java	3 Mar 2007 13:59:18 -0000	1.3
@@ -45,20 +45,23 @@
     	System.out.println("mat dau = " + material.getName());
     }
     
-	static double[] xpoints = {5.1,4.9,2.6,2.4,1.1,0.9,0.5,0};
+	static double[] xpoints = {0.0,10.1,9.9,5.1,4.9,2.6,2.4,1.1,0.9,0.5,0.25,0.2};
     public void testNavigator()
     {
     	IPhysicalVolumeNavigator nav = new PhysicalVolumeNavigator(world);
     	
-    	IPhysicalVolumePath path = nav.getPath("/test/test2");
+    	IPhysicalVolumePath path = nav.getPath("box1");
     	System.out.println("got path = " + path.toString());
     	
-    	ICoordinateTransformation3D t = nav.getTransform(path);
-    	System.out.println("trans to box /test/test2="+t.toString());
+    	path = nav.getPath("box1/box2");
+    	System.out.println("got path = " + path.toString());
     	
-    	IPhysicalVolumePath path2 = nav.getPath(new BasicHep3Vector(0,0,0));
-    	System.out.println("nav thinks 0,0,0 = " + path2.toString());    	    
-    
+    	path = nav.getPath("box1/box2/box3");
+    	System.out.println("got path = " + path.toString());
+    	
+    	ICoordinateTransformation3D t = nav.getTransform(path);
+    	System.out.println("transform to <" + path.toString() +"> = " + t.toString());
+    	      
     	for (double x : xpoints)
     	{
     		IPhysicalVolumePath path3 = nav.getPath(new BasicHep3Vector(x,0,0));
@@ -81,32 +84,32 @@
 	
 	public static final void createTestGeometryBoxes(IPhysicalVolume mom)
 	{
-		Box box = new Box("test_box",10.0,10.0,10.0);
+		Box box = new Box("test_box1",10.0,10.0,10.0);
 		LogicalVolume lvTest = new LogicalVolume("lvTest",box,dummymat);
 		new PhysicalVolume(
 				new CoordinateTransformation3D(),
-				"test",
+				"box1",
 				lvTest,
 				mom.getLogicalVolume(),
-				1);
+				0);
 	
 		Box box2 = new Box("test_box2",5.0,5.0,5.0);
 		LogicalVolume lvTest2 = new LogicalVolume("lvTest2",box2,dummymat);
 		new PhysicalVolume(
 				new CoordinateTransformation3D(new BasicHep3Vector(0,0,0)),
-				"test2",
+				"box2",
 				lvTest2,
 				lvTest,
-				1);
+				0);
 
-		Box box3 = new Box("test_box3",10.0*cm,10.0*cm,10.0*cm);
+		Box box3 = new Box("test_box3",1.0,1.0,1.0);
 		LogicalVolume lvTest3 = new LogicalVolume("lvTest3",box3,dummymat);
 		new PhysicalVolume(
 				new CoordinateTransformation3D(),
-				"test3",
+				"box3",
 				lvTest3,
-				lvTest,
-				2);		
+				lvTest2,
+				0);		
 	}
 	
 	public static final IPhysicalVolume createWorld()
CVSspam 0.2.8