44 #ifndef G4RANDOMTOOLS_HH
45 #define G4RANDOMTOOLS_HH
63 const G4int max_trials = 1024;
69 ndotv = normal * vect;
94 return cosphi * vec1 + sinphi *
vec2;
107 return (rmin <= 0) ? rmax*std::sqrt(k)
108 : std::sqrt(k*rmax*rmax + (1.-k)*rmin*rmin);
117 G4double aa = (a*a == 0) ? 0 : 1/(a*a);
119 for (
G4int i=0; i<1000; ++i)
139 for (
G4int i=0; i<1000; ++i)
144 G4double mu = std::sqrt((B*x)*(B*x) + (A*y)*(A*y));
163 for (
G4int i=0; i<1000; ++i)
169 G4double mu = std::sqrt(xbc*xbc + yac*yac + zab*zab);