This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gheisha / captur.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:58  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.38  by  S.Giani
11 *-- Author :
12       SUBROUTINE CAPTUR(NOPT)
13 C
14 C *** ROUTINE FOR CAPTURE OF NEUTRAL BARYONS ***
15 C *** NVE 04-MAR-1988 CERN GENEVA ***
16 C
17 C ORIGIN : H.FESEFELDT (02-DEC-1986)
18 C
19 #include "geant321/s_defcom.inc"
20       DIMENSION RNDM(3)
21 C
22       NOPT=1
23       IER(81)=IER(81)+1
24       PV(1,1)=PX*P
25       PV(2,1)=PY*P
26       PV(3,1)=PZ*P
27       PV(4,1)=EN
28       PV(5,1)=ABS(AMAS)
29       PV(6,1)=NCH
30       PV(7,1)=TOF
31       PV(8,1)=IPART
32       PV(9,1)=0.
33       PV(10,1)=USERW
34       ND=IND+1
35       PV(1,2)=0.
36       PV(2,2)=0.
37       PV(3,2)=0.
38       PV(4,2)=ATOMAS(ATNO(ND),ZNO(ND))
39       PV(5,2)=PV(4,2)
40       PV(6,2)=ZNO(ND)
41       PV(7,2)=TOF
42       PV(8,2)=0.
43       PV(9,2)=0.
44       PV(10,2)=0.
45       CALL ADD(1,2,MXGKPV)
46       PV(1,MXGKPV)=-PV(1,MXGKPV)
47       PV(2,MXGKPV)=-PV(2,MXGKPV)
48       PV(3,MXGKPV)=-PV(3,MXGKPV)
49       CALL NORMAL(RAN)
50       P=0.0065+RAN*0.0010
51       CALL GRNDM(RNDM,3)
52       COST=-1.+RNDM(1)*2.
53       SINT=SQRT(ABS(1.-COST*COST))
54       PHI=TWPI*RNDM(2)
55       PV(1,3)=P*SINT*SIN(PHI)
56       PV(2,3)=P*SINT*COS(PHI)
57       PV(3,3)=P*COST
58       PV(4,3)=P
59       PV(5,3)=0.
60       PV(6,3)=0.
61       PV(8,3)=1.
62       PV(9,3)=0.
63       PV(10,3)=0.
64       RAN=RNDM(3)
65       TOF=TOF-480.*LOG(RAN)
66       PV(7,3)=TOF
67       CALL LOR(3,MXGKPV,3)
68       NT=3
69       XP=0.008-P
70       IF(XP.LT.0.) GOTO 9
71       NT=4
72       CALL GRNDM(RNDM,2)
73       COST=-1.+RNDM(1)*2.
74       SINT=SQRT(ABS(1.-COST*COST))
75       PHI=TWPI*RNDM(2)
76       PV(1,4)=XP*SINT*SIN(PHI)
77       PV(2,4)=XP*SINT*COS(PHI)
78       PV(3,4)=XP*COST
79       PV(4,4)=XP
80       PV(5,4)=0.
81       PV(6,4)=0.
82       PV(7,4)=TOF
83       PV(8,4)=1.
84       PV(9,4)=0.
85       PV(10,4)=0.
86       CALL LOR(4,MXGKPV,4)
87     9 INTCT=INTCT+1.
88       CALL SETCUR(3)
89       NTK=NTK+1
90       IF(NT.EQ.4) CALL SETTRK(4)
91       IF(NPRT(4))
92      *WRITE(NEWBCD,1002) XEND,YEND,ZEND,EN,XP
93 1002  FORMAT(' *CAPTUR* NEUTRON CAPTURE   POSITION',3(2X,F8.2),2X,
94      * 'PHOTON ENERGIES',2X,2F8.4)
95 C
96       END