Index: trunk/source/processes/optical/include/G4OpAbsorption.hh
===================================================================
--- trunk/source/processes/optical/include/G4OpAbsorption.hh	(revision 819)
+++ trunk/source/processes/optical/include/G4OpAbsorption.hh	(revision 963)
@@ -26,5 +26,5 @@
 //
 // $Id: G4OpAbsorption.hh,v 1.9 2006/06/29 21:08:36 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 ////////////////////////////////////////////////////////////////////////
Index: trunk/source/processes/optical/include/G4OpBoundaryProcess.hh
===================================================================
--- trunk/source/processes/optical/include/G4OpBoundaryProcess.hh	(revision 819)
+++ trunk/source/processes/optical/include/G4OpBoundaryProcess.hh	(revision 963)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4OpBoundaryProcess.hh,v 1.16 2007/10/15 21:16:24 gum Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4OpBoundaryProcess.hh,v 1.18 2008/11/07 17:59:37 gum Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 // 
@@ -68,4 +68,8 @@
 #include "geomdefs.hh"
 #include "Randomize.hh"
+
+#include "G4RandomTools.hh"
+#include "G4RandomDirection.hh"
+
 #include "G4Step.hh"
 #include "G4VDiscreteProcess.hh"
@@ -162,17 +166,5 @@
 private:
 
-	void G4Swap(G4double* a, G4double* b) const;
-
-	void G4Swap(G4Material* a, G4Material* b) const;
-
-	void G4VectorSwap(G4ThreeVector* vec1, G4ThreeVector* vec2) const;
-
 	G4bool G4BooleanRand(const G4double prob) const;
-
-	G4ThreeVector G4IsotropicRand() const;
-
-	G4ThreeVector G4LambertianRand(const G4ThreeVector& normal);
-
-	G4ThreeVector G4PlaneVectorRand(const G4ThreeVector& normal) const;
 
 	G4ThreeVector GetFacetNormal(const G4ThreeVector& Momentum,
@@ -229,43 +221,4 @@
 
 inline
-void G4OpBoundaryProcess::G4Swap(G4double* a, G4double* b) const
-{
-	// swaps the contents of the objects pointed
-	// to by 'a' and 'b'!
-
-  G4double temp;
-
-  temp = *a;
-  *a = *b;
-  *b = temp;
-}
-
-inline
-void G4OpBoundaryProcess::G4Swap(G4Material* a, G4Material* b) const
-{
-	// ONLY swaps the pointers; i.e. what used to be pointed
-	// to by 'a' is now pointed to by 'b' and vice versa!
-
-   G4Material* temp = a;
-
-   a = b;
-   b = temp;
-}
-
-inline
-void G4OpBoundaryProcess::G4VectorSwap(G4ThreeVector* vec1,
-				       G4ThreeVector* vec2) const
-{
-        // swaps the contents of the objects pointed
-        // to by 'vec1' and 'vec2'!
-
-  G4ThreeVector temp;
-
-  temp = *vec1;
-  *vec1 = *vec2;
-  *vec2 = temp;
-}
-
-inline
 G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
 {
@@ -273,66 +226,4 @@
 
   return (G4UniformRand() < prob);
-}
-
-inline
-G4ThreeVector G4OpBoundaryProcess::G4IsotropicRand() const
-{
-  /* Returns a random isotropic unit vector. */
-
-  G4ThreeVector vect;
-  G4double len2;
-
-  do {
-
-    vect.setX(G4UniformRand() - 0.5);
-    vect.setY(G4UniformRand() - 0.5);
-    vect.setZ(G4UniformRand() - 0.5);
-
-    len2 = vect.mag2();
-
-  } while (len2 < 0.01 || len2 > 0.25);
-
-  return vect.unit();
-}
-
-inline
-G4ThreeVector G4OpBoundaryProcess::
-	      G4LambertianRand(const G4ThreeVector& normal)
-{
-  /* Returns a random lambertian unit vector. */
-
-  G4ThreeVector vect;
-  G4double ndotv;
-
-  do {
-    vect = G4IsotropicRand();
-
-    ndotv = normal * vect;
-
-    if (ndotv < 0.0) {
-      vect = -vect;
-      ndotv = -ndotv;
-    }
-
-  } while (!G4BooleanRand(ndotv));
-  return vect;
-}
-
-inline
-G4ThreeVector G4OpBoundaryProcess::
-	      G4PlaneVectorRand(const G4ThreeVector& normal) const
-
-  /* This function chooses a random vector within a plane given
-     by the unit normal */
-{
-  G4ThreeVector vec1 = normal.orthogonal();
-
-  G4ThreeVector vec2 = vec1.cross(normal);
-
-  G4double phi = twopi*G4UniformRand();
-  G4double cosphi = std::cos(phi);
-  G4double sinphi = std::sin(phi);
-
-  return cosphi * vec1 + sinphi * vec2;
 }
 
Index: trunk/source/processes/optical/include/G4OpRayleigh.hh
===================================================================
--- trunk/source/processes/optical/include/G4OpRayleigh.hh	(revision 819)
+++ trunk/source/processes/optical/include/G4OpRayleigh.hh	(revision 963)
@@ -26,5 +26,5 @@
 //
 // $Id: G4OpRayleigh.hh,v 1.9 2006/06/29 21:08:40 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 // 
Index: trunk/source/processes/optical/include/G4OpWLS.hh
===================================================================
--- trunk/source/processes/optical/include/G4OpWLS.hh	(revision 819)
+++ trunk/source/processes/optical/include/G4OpWLS.hh	(revision 963)
@@ -26,5 +26,5 @@
 //
 // $Id: G4OpWLS.hh,v 1.4 2006/06/29 21:08:42 gunter Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 ////////////////////////////////////////////////////////////////////////
