COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csampCollInA.f
Go to the documentation of this file.
1 ! ***********************************************************
2 ! *
3 ! * csampCollInA: sample # of collisions inside nucleus
4 ! *
5 ! *************** tested 88.08.03***********************k.k**
6 !
7 ! Hadron nucleus collision is decompsed into successive
8 ! collision of incident hadron (p, pi, etc)
9 ! with nucleon inside the nucleus. This program
10 ! obtains the # of successive collisions.
11 ! /usage/ call csampCollInA(proj, ia, nc)
12 ! proj: /ptcl/ input. projectile ptcl
13 ! nc: output. # of collistions sampled
14 ! /method/
15 ! Using wood-saxon density of nucleus, simplified
16 ! glauber calculation is done by using cwoodsaxon_den etc.
17 ! its results for
18 ! A**(1/3) = 4**(1/3) to 208**(1/3) with step (tatal width)/15
19 ! and for elementary cross sections log10(15mb) to log10(300mb)
20 ! step (total width)/15 is tabulated. (cumProb.h)
21 ! Because of the descrete nature of the table, the average number
22 ! could be 10 % smaller than what would be obtained by
23 ! exact table. The distributions for very high energy and
24 ! very high mass targeti are not accurate; they will not be
25 ! used in actual case.
26 !
27  subroutine csampcollina(pj, ia, nc)
28  implicit none
29 
30 #include "Zcode.h"
31 #include "Zptcl.h"
32  integer i
33  type(ptcl):: pj !input projectile particle
34  integer ia ! target mass no.
35  integer nc ! output number of collisions.
36 
37  real*8 a1, a2, a3, da
38  real*8 a, xs
39 !
40  integer idxa, idxxs
41 
42  real*8 u
43  real*8 xs1, xs2, dxs
44  integer mm, nn, kk
45  parameter( mm = 14, nn = 16, kk= 16)
46 ! cumProb, xsec A
47 
48  real*4 cumProb(mm, nn, kk)
49 
50 
51 
52 
53 ! parameter (a1 = 4.0**0.3333333, a2 = 208.**0.333333333333,
54  parameter(a1 = 1.5874011, a2 = 5.9249921,
55  * da = (a2-a1)/(kk-1) )
56 
57 ! parameter ( xs1 =log10(15.), xs2 =log10(300.) )
58  parameter( xs1 = 1.176091259, xs2 = 2.477121255,
59  * dxs =( xs2 - xs1)/15.)
60 
61 #include "cumProb.h"
62 ! get cross-section for proton target.
63 ! call cxpXsec(pj, xs)
64  call cinelx(pj, 1.d0, 1.d0, xs)
65  xs = log10(xs)
66 !
67  a = ia
68  a3 = a**0.3333333333
69  idxa = (a3- a1)/da + 1
70  idxxs = (xs - xs1)/dxs + 1
71  if( (a3 - idxa * da - a1) .gt. (idxa*da + da + a1 - a3) ) then
72  idxa = idxa + 1
73  endif
74  idxa =max(1, min(idxa, kk))
75 
76  if( (xs - idxxs * dxs - xs1) .gt.
77  * (idxxs * dxs + dxs + xs1 - xs) ) then
78  idxxs = idxxs +1
79  endif
80  idxxs =max(1, min(idxxs, nn))
81  call rndc(u)
82  do i=1, mm
83  if(u .le. cumprob(i, idxxs, idxa) ) then
84  nc=i
85  goto 100
86  endif
87  enddo
88  100 continue
89 
90  end
91 
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
subroutine csampcollina(pj, ia, nc)
Definition: csampCollInA.f:28
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Definition: Zptcl.h:75