Assuming that the absolute value of the momentum of a particle (gamma or electron) after brems-strahlung or pair-production is known, as well as the 3-momentum vector of the initial particle (electron or photon), this routine calculates the 3-momentum vector of the particle after radiation. If FIRST is true, the azimuthal angle around the original direction is generated as well (isotropically).
FIRST : .TRUE. -> generate phi .FALSE. -> use stored phi PB : 3-momentum of the particle before the interaction (in GeV/c) ABSPA : absolute value of the 3-momentum of the radiate particle (gamma or electron) (in GeV/c) COSTHE,SINTHE : cosine and sine of the angle between the line of flight of the particle before the interaction and the created particle.
POUT : 3-momentum of the created particle (in GeV/c)
none.
none.
(To get a RECTangular random-number)