Adjust/limit/specify beam angle

It can be easily done without G4RandomDirection():

G4double phi = 70*deg;
G4double a = 2*phi*G4UniformRand() + 90*deg - phi;
G4ThreeVector v(std::cos(a), std::sin(a), 0);
1 Like