]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gphys/ganni2.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gphys / ganni2.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:21  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
11 *-- Author :
12       SUBROUTINE GANNI2
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Generates positron annihilation at rest                  *
17 C.    *       (alias of GANNIR , directly called from GPAIRG)          *
18 C.    *                                                                *
19 C.    *    ==>Called by : GPAIRG,GPAIRM                                *
20 C.    *       Author    M.Maire *********                              *
21 C.    *                                                                *
22 C.    ******************************************************************
23 C.
24 #include "geant321/gcphys.inc"
25 #include "geant321/gctrak.inc"
26 #include "geant321/gcking.inc"
27 #include "geant321/gccuts.inc"
28 #include "geant321/gconsp.inc"
29       DIMENSION RNDM(2)
30 C.
31       KCASE = NAMEC(11)
32       IF((IANNI.NE.1).OR.(EMASS.LE.CUTGAM)) THEN
33          DESTEP = DESTEP + 2*EMASS
34          GO TO 999
35       ENDIF
36       CALL GRNDM(RNDM,2)
37       CT=-1.+2.*RNDM(1)
38       ST=SQRT((1.-CT)*(1.+CT))
39       PHI=TWOPI*RNDM(2)
40       NGKINE=NGKINE+1
41       GKIN(1,NGKINE)=EMASS*ST*COS(PHI)
42       GKIN(2,NGKINE)=EMASS*ST*SIN(PHI)
43       GKIN(3,NGKINE)=EMASS*CT
44       GKIN(4,NGKINE)=EMASS
45       GKIN(5,NGKINE)=1.
46       TOFD(NGKINE)=0.
47       GPOS(1,NGKINE) = VECT(1)
48       GPOS(2,NGKINE) = VECT(2)
49       GPOS(3,NGKINE) = VECT(3)
50       NGKINE=NGKINE+1
51       DO 10 J=1,3
52    10 GKIN(J,NGKINE)=-GKIN(J,NGKINE-1)
53       GKIN(4,NGKINE)=EMASS
54       GKIN(5,NGKINE)=1.
55       TOFD(NGKINE)=0.
56       GPOS(1,NGKINE) = VECT(1)
57       GPOS(2,NGKINE) = VECT(2)
58       GPOS(3,NGKINE) = VECT(3)
59 C
60   999 END