COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csPiAngOfPiN.f
Go to the documentation of this file.
1 ! implicit none
2 ! real*8 ecm, cs
3 ! integer cn, cpi, i
4 ! read(*,*) ecm
5 ! cn=1
6 ! cpi=0
7 ! do i=1, 10000
8 ! call csPiAngOfPiN(ecm, cn, cpi, cs)
9 ! write(*, *) cs
10 ! enddo
11 ! end
12 ! decay angle of a pion from pi-n system is sampled
13 ! call csPiAngOfPiN(cmse, cn, cpi, cs)
14 ! ------------------------------
15 ! cmsein: mass of pi-n system in GeV
16 ! cn: charge of n after decay
17 ! cpi: charge of pi after decay
18 ! cs: sampled pion polare angle (cos)
19 !
20 !
21  subroutine cspiangofpin(cmsein, cn, cpi, cs)
22  implicit none
23 
24  real*8 cmsein, cs
25  integer cn, cpi
26 
27 !
28  real*8 cmse, a, b, c
29  integer icon
30 !
31 ! a+,b+,c+: for (gamma + p)---> (n,pi+)
32 ! a0,c0 (b0=0 or b+) for (gamma + p)---> (p,pi0)
33 ! for (n,pi0) use 0
34 ! for (p,pi-) use +
35 ! a+(cms gev) + for (gamma + p)---> (n,pi+)
36 ! xmin= 1.239 xmax= 1.777
37  real*8 ap, bp, cp, a0, c0
38  real*8 x
39 !
40  ap(x)=(( 523.8081 *x-2523.137 )*x+ 3994.917 )*x-2066.6
41  *08
42 ! b+(cms)
43 ! xmin= 1.239 xmax= 1.777
44  bp(x)=((( 551.7981 *x-3704.184 )*x+ 9214.102 )*x-10054.2
45  *2 )*x+ 4057.190
46 ! c+(cms)
47 ! xmin= 1.239 xmax= 1.777
48  cp(x)=((-337.0378 *x+ 1605.070 )*x-2511.868 )*x+ 1287.63
49  * 5
50 ! a0(cms)
51 ! xmin= 1.239 xmax= 1.777
52  a0(x)=((( 5566.031 *x-33254.71 )*x+ 73843.62 )*x-72204
53  *.50 )*x+ 26239.76
54 ! c0(cms)
55 ! xmin= 1.239 xmax= 1.777
56  c0(x)=(((-5099.891 *x+ 30526.40 )*x-67929.69 )*x+ 6658
57  *6.12 )*x-24266.87
58 !
59  cmse=min(cmsein, 1.8d0)
60  cmse=max(cmse, 1.239d0)
61  if(cn .eq. 0 .and. cpi .eq. 1) then
62  a=ap(cmse)
63  b=bp(cmse)
64  c=cp(cmse)
65  elseif(cn .eq. 1 .and. cpi .eq. 0) then
66  a=a0(cmse)
67  b=0.
68  c=c0(cmse)
69  elseif(cn .eq. 1 .and. cpi .eq. -1) then
70  a=ap(cmse)
71  b=bp(cmse)
72  c=cp(cmse)
73  else
74  a=a0(cmse)
75  b=0.
76  c=c0(cmse)
77  endif
78 ! *** until loop***
79  do while (.true.)
80  call csamppolang(a, b, c, cs, icon)
81  if(icon .eq. 0) goto 30
82  enddo
83  30 continue
84  end
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
subroutine cspiangofpin(cmsein, cn, cpi, cs)
Definition: csPiAngOfPiN.f:22
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine csamppolang(a, b, c, cost, icon)
Definition: csampPolAng.f:8