Commit in lcsim/sandbox/RobKutschke/TRFTests/v1 on MAIN
RKSurf.java+26-91.1 -> 1.2
Add radiation length related code.

lcsim/sandbox/RobKutschke/TRFTests/v1
RKSurf.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- RKSurf.java	30 Aug 2007 14:16:33 -0000	1.1
+++ RKSurf.java	13 Sep 2007 22:38:31 -0000	1.2
@@ -33,9 +33,9 @@
  *
  *
  *@author $Author: kutschke $
- *@version $Id: RKSurf.java,v 1.1 2007/08/30 14:16:33 kutschke Exp $
+ *@version $Id: RKSurf.java,v 1.2 2007/09/13 22:38:31 kutschke Exp $
  *
- * Date $Date: 2007/08/30 14:16:33 $
+ * Date $Date: 2007/09/13 22:38:31 $
  *
  */
 
@@ -82,6 +82,12 @@
     // Name of the material.
     public String matname = "Undefined";
 
+    // Radiation length of the material;
+    public double radl = 0;
+
+    // Thickness in units of radiation length.
+    public double thick_radl = 0.;
+
     // Tolerance for comparing floating point numbers.
     private double tolerance = 1.e-4;
 
@@ -237,7 +243,7 @@
 
     public void Print(){
 	if ( type == type_tube ){
-	    System.out.printf ( "%-40s %1d %3d %10.2f %10.2f %10.2f %10.2f %-20s\n",
+	    System.out.printf ( "%-40s %1d %3d %10.2f %10.2f %10.2f %10.2f %-20s %10.2f %10.6f\n",
 				name,
 				rodim, 
 				ixy,
@@ -245,10 +251,12 @@
 				thick,
 				zmin,
 				zmax,
-				matname
+				matname,
+				radl,
+				thick_radl
 				);
 	} else {
-	    System.out.printf ( "%-40s %1d %3d %10.2f %10.2f %10.2f %10.2f %-20s\n",
+	    System.out.printf ( "%-40s %1d %3d %10.2f %10.2f %10.2f %10.2f %-20s %10.2f %10.6f\n",
 				name,
 				rodim, 
 				ixy,
@@ -256,7 +264,9 @@
 				thick,
 				rmin,
 				rmax,
-				matname
+				matname,
+				radl,
+				thick_radl
 				);
 	}
     }
@@ -278,6 +288,9 @@
 	}
 
 	matname = material.getName();
+	radl    = material.getRadiationLength();
+
+	thick_radl = thick/radl;
 
     }
 
@@ -314,6 +327,9 @@
 	    System.exit(-1);
 	}
 	matname = mat.getName();
+	radl = mat.getRadiationLength();
+
+	thick_radl = thick/radl;
 
     }
 
@@ -347,6 +363,8 @@
 	// Depracated but replacement appears not to be in place.
 	material = pc.getMaterial();
 
+	radl = material.getRadiationLength();
+
     }
 
     private void AddTube ( Tube tube, Hep3Vector center ){
@@ -362,7 +380,7 @@
 	zmax   = tube.getZHalfLength();
 	radius = 0.5*(tube.getOuterRadius()+tube.getInnerRadius());
 	thick  = tube.getOuterRadius()-tube.getInnerRadius();
-	
+
     }
 
     private void AddZDisc ( Tube tube, Hep3Vector center ){
@@ -370,12 +388,11 @@
 	zmin   = center.z()-tube.getZHalfLength();
 	zmax   = center.z()+tube.getZHalfLength();
 	radius = 0.5*(tube.getOuterRadius()+tube.getInnerRadius());
-	thick  = tube.getZHalfLength();
+	thick  = 2.*tube.getZHalfLength();
 	
 	zc     = center.z();
 	rmin   = tube.getInnerRadius();
 	rmax   = tube.getOuterRadius();
-	
     }
 
 
CVSspam 0.2.8