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

Go to the source code of this file.

Functions/Subroutines

real *8 function cnewcos (H, cost, L)
 
real *8 function cnewsin (H, cost, L)
 
real *8 function cnewh (H, cost, L)
 
subroutine cnewcossin (h1, cos1, leng, h2, cos2, sin2)
 
real *8 function clenbetween2h (h1, h2, cost)
 
subroutine clenbetw2h (h1, h2, cost, leng, icon)
 

Function/Subroutine Documentation

◆ clenbetw2h()

subroutine clenbetw2h ( real*8  h1,
real*8  h2,
real*8  cost,
real*8  leng,
integer  icon 
)

Definition at line 176 of file catmosutil.f.

References d, and d0.

Referenced by csetmintime(), and cthick2len().

176  implicit none
177  real*8 h1, h2, cost
178  real*8 leng ! output
179  integer icon ! output
180 
181  real*8 sint, costp, sintp
182  character*120 text
183 
184  sint = sqrt(1.d0 - cost**2)
185  sintp = h1*sint /h2
186  icon = 0
187  if(sintp .le. 1.0d0) then
188  costp = sqrt(1.d0 - sintp**2)*sign(1.d0, cost)
189  leng = h1* cost - h2 * costp
190  else
191  if(abs(1.d0-sintp**2) .lt. 1.d-6) then
192  costp = 0.
193  leng = h1* cost
194  else
195  icon = 1
196  endif
197  endif
integer leng
Definition: interface2.h:1
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
Here is the caller graph for this function:

◆ clenbetween2h()

real*8 function clenbetween2h ( real*8  h1,
real*8  h2,
real*8  cost 
)

Definition at line 138 of file catmosutil.f.

References cerrormsg(), d, and d0.

138  implicit none
139  real*8 h1, h2, cost
140 
141  real*8 sint, costp, sintp
142  character*120 text
143 
144  sint = sqrt(1.d0 - cost**2)
145  sintp = h1*sint /h2
146  if(sintp .le. 1.0d0) then
147 
148  costp = sqrt(1.d0 - sintp**2)*sign(1.d0, cost)
149  else
150  if(abs(1.d0-sintp**2) .lt. 1.d-6) then
151  costp = 0.
152  else
153  write(text, *) 'h1, h2, cost=', h1, h2, cost,
154  * ' sintp=',sintp
155  call cerrormsg(text, 1)
156  call
157  * cerrormsg('h1,h2,cost invalid at clenbetwee2h', 0)
158  endif
159  endif
160 !
161  clenbetween2h = h1* cost - h2 * costp
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
real *8 function clenbetween2h(h1, h2, cost)
Definition: catmosutil.f:138
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
Here is the call graph for this function:

◆ cnewcos()

real*8 function cnewcos ( real*8  H,
real*8  cost,
real*8  L 
)

Definition at line 70 of file catmosutil.f.

References d0.

70 !
71  implicit none
72  real*8 h, cost, l
73 !
74  real*8 eps/1.d-8/, tmp
75 
76  tmp = l/h
77  if(tmp .lt. eps) then
78  cnewcos = (cost - tmp) /
79  * ( ( tmp * (1.-cost**2)/2 -cost)*tmp +1.)
80  elseif(abs(cost) .ne. 1.d0) then
81  cnewcos = (cost - tmp)/ sqrt( (tmp - cost*2)*tmp +1.)
82  else
83  cnewcos = cost
84  endif
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
dE dx *! Nuc Int sampling table h
Definition: cblkMuInt.h:130
real *8 function cnewcos(H, cost, L)
Definition: catmosutil.f:70

◆ cnewcossin()

subroutine cnewcossin ( real*8  h1,
real*8  cos1,
real*8  leng,
real*8  h2,
real*8  cos2,
real*8  sin2 
)

Definition at line 112 of file catmosutil.f.

References d0.

Referenced by clen2thickt(), and ct2lt().

112  implicit none
113  real*8 h1 ! input. radial distance from the earth center
114  real*8 cos1 ! input. cos of zenith angle at h1
115  real*8 leng ! input. length in m along cos1 from h1
116  real*8 h2 ! output. radial distance from the earth center
117  real*8 cos2 ! outpu. cos of zenith angle at h2.
118  real*8 sin2 ! output. sin of //
119 
120  real*8 sin1, cnewh
121 
122 ! h1 cos1 - h2 cos2 = leng
123 ! h1 sin1 = h2 sin2
124 
125  sin1 = sqrt(1.d0 - cos1**2)
126  h2 = cnewh(h1, cos1, leng)
127  sin2 = h1 * sin1/h2
128  cos2 = (h1*cos1 -leng)/h2
integer leng
Definition: interface2.h:1
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real *8 function cnewh(H, cost, L)
Definition: catmosutil.f:98
Here is the caller graph for this function:

◆ cnewh()

real*8 function cnewh ( real*8  H,
real*8  cost,
real*8  L 
)

Definition at line 98 of file catmosutil.f.

References d0.

Referenced by clen2thickap().

98  implicit none
99  real*8 h, cost, l, tmp
100 
101  real*8 eps/1.d-8/
102 
103  tmp = l/h
104  if(tmp .lt. eps) then
105  cnewh = h * ( (tmp * (1.d0 -cost**2)/2 - cost )* tmp + 1.d0)
106  else
107  cnewh =h* sqrt( ( tmp - cost*2)*tmp + 1.d0 )
108  endif
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
dE dx *! Nuc Int sampling table h
Definition: cblkMuInt.h:130
real *8 function cnewh(H, cost, L)
Definition: catmosutil.f:98
Here is the caller graph for this function:

◆ cnewsin()

real*8 function cnewsin ( real*8  H,
real*8  cost,
real*8  L 
)

Definition at line 88 of file catmosutil.f.

References d0.

88  implicit none
89  real*8 h, cost, l
90 !
91  real*8 cnewh, sint
92 
93  sint = sqrt(1.d0 - cost**2)
94  cnewsin = h * sint/ cnewh(h, cost, l)
real *8 function cnewsin(H, cost, L)
Definition: catmosutil.f:88
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table h
Definition: cblkMuInt.h:130
real *8 function cnewh(H, cost, L)
Definition: catmosutil.f:98