46 #ifndef G4RANDOMDIR_HH
47 #define G4RANDOMDIR_HH
49 #include <CLHEP/Units/PhysicalConstants.h>
58 G4double sinTheta2 = 1. - cosTheta*cosTheta;
59 if( sinTheta2 < 0.) sinTheta2 = 0.;
60 G4double sinTheta = std::sqrt(sinTheta2);
63 sinTheta*std::sin(phi), cosTheta).unit();
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector G4RandomDirection()
static const double twopi