5 * Revision 1.1.1.1 1995/10/24 10:19:58 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.44 by S.Giani
15 *=== rakekv ===========================================================*
17 SUBROUTINE RAKEKV ( IT, EXSOP, BBTAR, TKIN, TSTRCK, PSTRCK,
18 & ARECL, TKRECL, EFERMI, CDE, SDE )
20 #include "geant321/dblprc.inc"
21 #include "geant321/dimpar.inc"
22 #include "geant321/iounit.inc"
24 *----------------------------------------------------------------------*
25 * version by Alfredo Ferrari
27 * last change 03 january 93 by Alfredo Ferrari
30 * To be called from the high energy production
32 * this is a subroutine of fluka to sample intranuclear cascade
33 * particles: it is based on the old Rakeka from J. Ranft
36 * it = type of the secondary requested; 1=proton, 2=neutron
37 * bbtar = atomic weight of the medium
40 * tkin = kinetic energy of the secondary in GeV before applying
41 * the nuclear well (and eventually the Coulomb barreer)
42 * tstrck= kinetic energy of the secondary in GeV
43 * pstrck= momentum of the secondary in GeV/c
44 * cde,sde = cosine and sine of the angle between the
45 * directions of the primary
46 * and secondary particles
48 *********************************************************************
50 #include "geant321/nucdat.inc"
51 #include "geant321/parevt.inc"
52 COMMON / FKNUCO / HELP (2), HHLP (2), FTVTH (2), FINCX (2),
53 & EKPOLD (2), BBOLD, ZZOLD, SQROLD, ASEASQ,
55 COMMON / FKCASF / PKFRMI, COSTH, PKIN
57 REAL RNDM(4), RNGSS, DUMNOR
58 * In this version the low energy component has been suppressed, since
59 * they are now produced by the evaporation model, A. Ferrari.
60 * The parameters needed for the sampling have been already set in
63 * +-------------------------------------------------------------------*
66 * | Sample the Fermi momentum
68 PKFRMI = PFRMMX (IT) * MAX ( RNDM (1), RNDM (2),
70 PKFRSQ = PKFRMI * PKFRMI
71 TKIN = - ESLOPE (IT) * LOG ( EXMNNU (IT) - RNDM (4) * (
72 & EXMNNU (IT) - EXUPNU (IT) ) )
73 TKRECL = 0.5D+00 * PKFRSQ / ( AMUC12 * ARECL ) * ( 1.D+00 -
74 & 0.25D+00 * PKFRSQ / ( ARECL**2 * AMUCSQ ) )
75 EFERMI = SQRT ( AMNUSQ (IT) + PKFRSQ )
76 TSTRCK = EFERMI + TKIN - AMNUCL (IT) - V0WELL (IT) - TKRECL -
78 * | +----------------------------------------------------------------*
79 * | | Record the energy spent without emitting nucleons
80 IF ( TSTRCK .LE. VEFFNU (IT) - V0WELL (IT) ) THEN
81 * | | Reduce that energy according to Fspred:
82 EXSOP (IT) = EXSOP (IT) + TKIN * FEX0RD
84 * +-<|--<--<--<--<--< go to resampling
87 * | +----------------------------------------------------------------*
89 * +-------------------------------------------------------------------*
90 PSTRCK = SQRT ( TSTRCK * ( TSTRCK + 2.D+00 * AMNUCL (IT) ) )
91 * Sample the angle between the incident particle and the Fermi
93 * Solution assuming that the momentum transfer is equal to the
94 * the momentum loss of the projectile for the energy loss Tkin,
95 * roughly given by Tkin again. Use this with the "usual" eventv
99 COSTH = 2.D+00 * RNDM (1) - 1.D+00
100 COSDE2 = PKFRMI * COSTH + PKIN
101 CSIGN = SIGN ( ONEONE, COSDE2 )
102 COSDE2 = COSDE2 * COSDE2 / ( PKIN2 + PKFRSQ +
103 & 2.D+00 * COSTH * PKIN * PKFRMI )
104 CDE = CSIGN * SQRT ( COSDE2 )
106 SDE0 = MAX ( ONEONE - CDE, ANGLGB )
109 TMPSDE = 3.5D+00 * SDE0
110 FCORR = ATO1O3 * MIN ( FCORR0, TMPSDE )
112 CALL GRANOR ( RNGSS, DUMNOR )
113 SDE = SDE0 + FCORR * RNGSS
115 IF ( ABS ( CDE ) .GE. 1.D+00 ) GO TO 2000
116 SDE = SQRT ( ( 1.D+00 - CDE ) * ( 1.D+00 + CDE ) )