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

Go to the source code of this file.

Functions/Subroutines

subroutine creadsoftenpara (io)
 
subroutine cwritesoftenpara (io)
 
subroutine cskipsep (io)
 
subroutine creadparar (vvalue, x)
 
subroutine creadparar2 (vvalue, x, n)
 
subroutine creadparacx (vvalue, c)
 
subroutine creadparai (vvalue, i)
 
subroutine creadparac (vvalue, cha)
 
subroutine creadparal (vvalue, logi)
 
subroutine cwriteparar (io, vname, x)
 
subroutine cwriteparar2 (io, vname, x, n)
 
subroutine cwriteparacx (io, vname, c)
 
subroutine cwriteparai (io, vname, i)
 
subroutine cwriteparac (io, vname, cha)
 
subroutine cwriteparal (io, vname, logi)
 
logical function cgetparmn (io, vname, vv)
 

Function/Subroutine Documentation

◆ cgetparmn()

logical function cgetparmn ( integer  io,
character*(*)  vname,
character*(*)  vv 
)

Definition at line 165 of file creadSoftenPara.f.

References false, parameter(), and true.

Referenced by creadsoftenpara(), and softenpik::creadsoftenpara().

165 ! get parameter variable name and given value(s) from io
166  implicit none
167  integer io
168  character*(*) vname, vv ! output
169  logical ans
170 
171  integer linel
172  parameter( linel = 100)
173  character*(linel) line
174  integer loc, loc2
175  vname = " "
176  do while(.true.)
177  read(io, '(a)', end=100 ) line
178  if( line(1:1) .eq. " " .and. line(2:2) .ne. " ") then
179  loc = index( line(3:linel), " ") + 2
180  vname = line(2:loc-1)
181  loc2 = index( line, "/")
182  if(loc2 .eq. 0 ) then
183  write(0,* ) ' "/" is missing in the input data file '
184  write(0,*) ' The line is: ', line
185  stop 1234
186  endif
187  vv = line(loc+1:linel) ! some data containes '/' such as '../../Media' so put all
188  ! data.
189  goto 50
190  endif
191  enddo
192  50 continue
193  ans = .true.
194  return
195  100 continue
196  ans =.false.
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
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 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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ creadparac()

subroutine creadparac ( character*(*)  vvalue,
character*(*)  cha 
)

Definition at line 93 of file creadSoftenPara.f.

93  implicit none
94  character*(*) vvalue
95  character*(*) cha
96  read(vvalue, *) cha

◆ creadparacx()

subroutine creadparacx ( character*(*)  vvalue,
complex*8  c 
)

Definition at line 79 of file creadSoftenPara.f.

79  implicit none
80  character*(*) vvalue
81  complex*8 c
82  read( vvalue, *) c
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130

◆ creadparai()

subroutine creadparai ( character*(*)  vvalue,
integer  i 
)

Definition at line 86 of file creadSoftenPara.f.

Referenced by creadsoftenpara(), and softenpik::creadsoftenpara().

86  implicit none
87  character*(*) vvalue
88  integer i
89  read(vvalue, *) i
nodes i
Here is the caller graph for this function:

◆ creadparal()

subroutine creadparal ( character*(*)  vvalue,
logical  logi 
)

Definition at line 100 of file creadSoftenPara.f.

Referenced by creadsoftenpara(), and softenpik::creadsoftenpara().

100  implicit none
101  character*(*) vvalue
102  logical logi
103  read(vvalue, *) logi
Here is the caller graph for this function:

◆ creadparar()

subroutine creadparar ( character*(*)  vvalue,
real*8  x 
)

Definition at line 61 of file creadSoftenPara.f.

Referenced by creadsoftenpara(), and softenpik::creadsoftenpara().

61  implicit none
62  integer io
63  character*(*) vvalue
64  real*8 x
65 ! read(vvalue, *) x, x
66  read(vvalue, *) x
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the caller graph for this function:

◆ creadparar2()

subroutine creadparar2 ( character*(*)  vvalue,
real*8, dimension(n x,
integer  n 
)

Definition at line 69 of file creadSoftenPara.f.

69  implicit none
70  integer io
71  character*(*) vvalue
72  integer n
73  real*8 x(n)
74  read(vvalue, *) x
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ creadsoftenpara()

subroutine creadsoftenpara ( integer, intent(in)  io)

Definition at line 2 of file creadSoftenPara.f.

References cgetparmn(), creadparai(), creadparal(), creadparar(), and cskipsep().

Referenced by softenpik::csoftenpik().

2  implicit none
3  integer,intent(in):: io ! logical dev. #
4  character*24 vname
5  character*100 vvalue
6 
7 
8  call cskipsep(io)
9  do while( cgetparmn(io, vname, vvalue ) )
10  select case(vname)
11  case('mode')
12  call creadparai(vvalue, mode)
13  case('xth')
14  call creadparar(vvalue, xth)
15  case('E0th')
16  call creadparar(vvalue, e0th)
17  case('fwbw')
18  call creadparai(vvalue, fwbw)
19  case('pw')
20  call creadparar(vvalue, pw)
21  case('repeat')
22  call creadparar(vvalue, repeat)
23  case('special')
24  call creadparal(vvalue, special)
25  case('leadingPiK')
26  call creadparal(vvalue, leadingpik)
27  case('useXinCMS')
28  call creadparal(vvalue, usexincms)
29  end select
30  enddo
logical, save special
Definition: csoftenPiK.f:55
integer, save fwbw
Definition: csoftenPiK.f:50
logical, save usexincms
Definition: csoftenPiK.f:90
subroutine creadparal(vvalue, logi)
logical, save leadingpik
Definition: csoftenPiK.f:81
logical function cgetparmn(io, vname, vv)
integer, save mode
Definition: csoftenPiK.f:34
real(8), save pw
Definition: csoftenPiK.f:36
subroutine creadparar(vvalue, x)
real(8), save e0th
Definition: csoftenPiK.f:46
real(8), save repeat
Definition: csoftenPiK.f:40
subroutine creadparai(vvalue, i)
subroutine cskipsep(io)
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cskipsep()

subroutine cskipsep ( integer  io)

Definition at line 51 of file creadSoftenPara.f.

References true.

Referenced by creadsoftenpara(), and softenpik::creadsoftenpara().

51  implicit none
52  integer io
53  character(10) sep
54  do while (.true.)
55  read(io, '(a)') sep
56  if(sep(2:10) == '---------') exit
57  enddo
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
Here is the caller graph for this function:

◆ cwriteparac()

subroutine cwriteparac ( integer  io,
character*(*)  vname,
character*(*)  cha 
)

Definition at line 142 of file creadSoftenPara.f.

142  implicit none
143  integer io
144  character*(*) vname
145  character*(*) cha
146  integer klena
147  character*2 qmk/" '"/ ! '
148  if(klena(cha) .gt. 0) then
149  write(io, *) ' ', vname, qmk, cha(1:klena(cha)),
150  * qmk,' /'
151  else
152  write(io, *) ' ', vname, qmk, ' ', qmk, ' /'
153  endif
integer function klena(cha)
Definition: klena.f:20

◆ cwriteparacx()

subroutine cwriteparacx ( integer  io,
character*(*)  vname,
complex*8  c 
)

Definition at line 125 of file creadSoftenPara.f.

125  implicit none
126  integer io
127  character*(*) vname
128  complex*8 c
129  write(io, *) ' ', vname,' ', c,' /'
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130

◆ cwriteparai()

subroutine cwriteparai ( integer  io,
character*(*)  vname,
integer  i 
)

Definition at line 133 of file creadSoftenPara.f.

Referenced by cwritesoftenpara(), and softenpik::cwritesoftenpara().

133  implicit none
134  integer io
135  character*(*) vname
136  integer i
137 
138  write(io, *) ' ', vname,' ', i,' /'
nodes i
Here is the caller graph for this function:

◆ cwriteparal()

subroutine cwriteparal ( integer  io,
character*(*)  vname,
logical  logi 
)

Definition at line 156 of file creadSoftenPara.f.

Referenced by cwritesoftenpara(), and softenpik::cwritesoftenpara().

156  implicit none
157  integer io
158  character*(*) vname
159  logical logi
160 
161  write(io, *) ' ', vname,' ', logi,' /'
Here is the caller graph for this function:

◆ cwriteparar()

subroutine cwriteparar ( integer  io,
character*(*)  vname,
real*8  x 
)

Definition at line 107 of file creadSoftenPara.f.

Referenced by cwritesoftenpara(), and softenpik::cwritesoftenpara().

107  implicit none
108  integer io
109  character*(*) vname
110  real*8 x
111 
112  write(io, *) ' ', vname,' ', x,' /'
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the caller graph for this function:

◆ cwriteparar2()

subroutine cwriteparar2 ( integer  io,
character*(*)  vname,
real*8, dimension(n x,
integer  n 
)

Definition at line 115 of file creadSoftenPara.f.

115  implicit none
116  integer io
117  integer n ! arra size of x
118  character*(*) vname
119  real*8 x(n)
120 
121  write(io,*) ' ', vname,' ', x,' /'
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ cwritesoftenpara()

subroutine cwritesoftenpara ( integer, intent(in)  io)

Definition at line 34 of file creadSoftenPara.f.

References cwriteparai(), cwriteparal(), and cwriteparar().

Referenced by softenpik::csoftenpik().

34  implicit none
35  integer,intent(in):: io
36 
37  write(io,*)'----------------------'
38  call cwriteparai(io,'mode', mode)
39  call cwriteparar(io,'xth', xth)
40  call cwriteparar(io,'E0th', e0th)
41  call cwriteparai(io,'fwbw', fwbw)
42  call cwriteparar(io,'pw', pw)
43  call cwriteparar(io,'repeat',repeat)
44  call cwriteparal(io,'special',special)
45  call cwriteparal(io,'leadingPiK',leadingpik)
46  call cwriteparal(io,'useXinCMS', usexincms)
subroutine cwriteparai(io, vname, i)
logical, save special
Definition: csoftenPiK.f:55
integer, save fwbw
Definition: csoftenPiK.f:50
logical, save usexincms
Definition: csoftenPiK.f:90
logical, save leadingpik
Definition: csoftenPiK.f:81
integer, save mode
Definition: csoftenPiK.f:34
real(8), save pw
Definition: csoftenPiK.f:36
real(8), save e0th
Definition: csoftenPiK.f:46
real(8), save repeat
Definition: csoftenPiK.f:40
subroutine cwriteparal(io, vname, logi)
subroutine cwriteparar(io, vname, x)
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function: