5 * Revision 1.1.1.1 1995/10/24 10:21:23 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.21 by S.Giani
12 SUBROUTINE GDECA2(XM0,XM1,XM2,PCM)
14 C. ******************************************************************
16 C. * Simulates two body decay process with isotropic angular *
17 C. * distribution in CMS. *
19 C. * ==>Called by : GDECAY *
20 C. * Author G.Patrick ********* *
22 C. ******************************************************************
24 #include "geant321/gconsp.inc"
28 C. ------------------------------------------------------------------
30 C Generate first decay product in CMS.
32 E1=(XM0*XM0+XM1*XM1-XM2*XM2)/(2.*XM0)
33 P1=SQRT(ABS((E1-XM1)*(E1+XM1)))
35 C Isotropic decay angular distribution.
39 IF(ABS(COSTH).GE.1.0) THEN
43 SINTH=SQRT((1.-COSTH)*(1.+COSTH))
47 C Polar co-ordinates to momentum components.
49 PCM(1,1)=P1*SINTH*COS(PHI)
50 PCM(2,1)=P1*SINTH*SIN(PHI)
54 C Generate second decay product.
59 PCM(4,2)=SQRT(PCM(1,2)**2+PCM(2,2)**2+PCM(3,2)**2+XM2*XM2)