This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gtrak / granor.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:42  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.23  by  S.Giani
11 *-- Author :
12       SUBROUTINE GRANOR(A,B)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       To generate 2 numbers A and B following a NORMAL         *
17 C.    *       distribution (mean=0 sigma=1.)                           *
18 C.    *         Copy of the CERN Library routine RANNOR                *
19 C.    *                                                                *
20 C.    *    ==>Called by : <USER>, many GEANT routines                  *
21 C.    *       Author    F.Carminati *********                          *
22 C.    *                                                                *
23 C.    ******************************************************************
24 C.
25       DIMENSION RNDM(2)
26 *
27       CALL GRNDM(RNDM,2)
28       Y=RNDM(1)
29       Z=RNDM(2)
30       X=6.283185*Z
31       A1=SQRT (-2.0*LOG(Y))
32       A=A1*SIN (X)
33       B=A1*COS (X)
34       RETURN
35       END
36