COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cxAbyxpXsec.f File Reference

Go to the source code of this file.

Functions/Subroutines

real(8) function cxabyxpxsec (xpin, Ain)
 
real(8) function cxabyxpxsecold (xpin, a)
 

Function/Subroutine Documentation

◆ cxabyxpxsec()

real(8) function cxabyxpxsec ( real(8), intent(in)  xpin,
real(8), intent(in)  Ain 
)

Definition at line 9 of file cxAbyxpXsec.f.

References copenf(), d0, false, kpolintp2s(), and true.

9  implicit none
10 #include "Zevhnp.h"
11 #include "Zmanagerp.h"
12  real(8),intent(in):: xpin ! xp inelastic cross section. (mb)
13  ! x may be any. (pi,K,p, gamma, nu )
14  real(8),intent(in):: ain ! target mass #. May be non integer.
15  ! A = 2 ~ 210
16  real(8):: ratio ! SigxA/sigxp
17 
18  logical,save:: first=.true.
19  character(40)::filedpm="$COSMOSTOP/Data/DPM/sigxAbysigxp"
20  character(40)::fileqgs="$COSMOSTOP/Data/QGS/sigxAbysigxp"
21  character(40)::fileepos="$COSMOSTOP/Data/EPOS/sigxAbysigxp"
22  character(40)::file
23  integer::icon
24 
25  real(4),allocatable,save::xsratio(:,:)
26  real(4),allocatable,save::xsa(:)
27  real(4),allocatable,save::aa(:)
28  real(4)::xp, a, ratios, error
29  real(4):: xsv, av, xsr, ar
30 
31  integer,save::ixs, ia
32  integer::ixsc, iac
33  real(8):: cxabyxpxsecold
34 
35 
36  real(8):: xsxa
37  if( first ) then
38  ! read table sigxAbysigxp
39  if( sxabysxpopt == 1 ) then
40  file =fileqgs
41  elseif(sxabysxpopt == 2) then
42  file =filedpm
43  elseif(sxabysxpopt == 3) then
44  file = fileepos
45  elseif(sxabysxpopt == 4) then
46  ! use old one
47  goto 200
48  elseif( sxabysxpopt == 0) then
49  ! use default
50  file =fileqgs
51  else
52  write(0,*) ' SxAbySxpOpt =',sxabysxpopt,' invalid'
53  write(0,*) ' it must be 1 ~4'
54  stop
55  endif
56  call copenf(tempdev, file, icon)
57  if(icon /= 0) then
58  write(0,*) file, " could not be opened "
59  stop
60  endif
61  xsv =0.
62  av = 0.
63  ixs = 0
64  ia = 0
65  do while(.true.)
66  read(tempdev,*, end=100) xsr, ar
67  if( xsr > xsv ) then
68  ixs = ixs + 1
69  xsv = xsr
70  endif
71  if( ar > av ) then
72  ia = ia + 1
73  av = ar
74  endif
75  enddo
76  100 continue
77  rewind tempdev
78  allocate( xsratio(ixs, ia) )
79  allocate( xsa(ixs) )
80  allocate( aa(ia) )
81  do ixsc = 1, ixs
82  do iac = 1, ia
83  read(tempdev,*)
84  * xsa(ixsc), aa(iac), xsratio(ixsc, iac)
85  enddo
86  enddo
87  close(tempdev)
88  200 continue
89  first = .false.
90  endif
91  if( ain == 1.0 ) then
92  ratio = 1.
93  return !******************
94  endif
95 
96  if( xpin < 15.d0 .or. sxabysxpopt == 4 ) then
97  ratio = cxabyxpxsecold(xpin, ain)
98  else
99  xp = xpin
100  a = ain
101  call kpolintp2s(xsa, 1, 0., aa, 1, 0.,
102  * xsratio, ixs, ixs, ia, 2, 2, xp, a, ratios, error)
103  ratio = ratios
104  if( ratio < 1. ) then
105  ratio = cxabyxpxsecold(xpin, ain)
106  endif
107  endif
logical, save first
Definition: cNRLAtmos.f:8
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
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine copenf(io, fnin, icon)
Definition: copenf.f:8
real(4), save a
Definition: cNRLAtmos.f:20
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 ! knockon is considered Obsolete *PhotoProd false
Definition: cblkElemag.h:7
real(8) function cxabyxpxsecold(xpin, a)
Definition: cxAbyxpXsec.f:111
subroutine kpolintp2s(xa, xstep, dx, ya, ystep, dy, za, adj, m, n, ma, na, x, y, z, error)
Definition: kpolintp2S.f:41
Here is the call graph for this function:

◆ cxabyxpxsecold()

real(8) function cxabyxpxsecold ( real(8), intent(in)  xpin,
real(8), intent(in)  a 
)

Definition at line 111 of file cxAbyxpXsec.f.

References d0, and e.

111 ! This give old value; for large xpin and small Ain
112 ! ration seems to be little bit smaller than other
113 ! code.
114  implicit none
115  real(8),intent(in):: xpin ! see cxAbyxpXsec
116  real(8),intent(in):: a ! see cxAbyxpXsec
117  real(8):: ratio ! xA/xp cross-section ratio
118  real(8):: cinelcosbypdg
119 
120  real ca, cb, cc
121  if(xpin .lt. 15.) then
122  ca = .93812*a**1.0215
123  cb = .65000e-02* a**0.5 + (((-.37436e-10* a +.18937e-07)*a
124  * -.33424e-05)* a + .21646e-03)*a -.31385e-02
125  ratio = ca/(1.0 + cb* xpin)
126  elseif(xpin .lt. 35.) then
127  cb = (0.17859e-05*a-.48592)*a + .66909e-02 +
128  * 0.48968 * a**0.99875
129  ca = (0.67395e-03*a + .93859 )*a + .26890 +
130  * .34987e-01 * a**1.4525
131  cc = 0.925
132  ratio = ca/(1.0 + cb* xpin**cc)
133  else
134  ca = 80.000 * a**0.17829 + (((-.52469e-07*a +.30395e-04)*a
135  * -.69823e-02)*a +1.0517)*a +16.427
136  if(a .lt. 20.) then
137  cb = 90.029* a**(-1.0219) +
138  * (.94351e-02*a -.45131)*a+6.4772
139  else
140  cb = 130.79*a**(-1.0) +
141  * (-.89803e-05*a +.52418e-02)*a -1.2073
142  endif
143  ratio = ca* log(1.0 + xpin/cb)/xpin
144  endif
145  ratio = ratio/cinelcosbypdg(a)
146  ratio = max(1.d0, ratio)
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real(8) function cinelcosbypdg(A)
Definition: cinelx.f:231
real(4), save a
Definition: cNRLAtmos.f:20