6 subroutine cl2ttbl(h1, h2, cosz1, cosz2, step,
7 * lengtb, htb, costb, thicktb, maxsize, tblsize)
21 real*8 lengtb(maxsize)
22 real*8 thicktb(maxsize)
31 real*8 temp, cnewcos, cnewh
49 lengtb(i) = lengtb(i-1) + step
50 thicktb(i) = thicktb(i-1) + clen2thickex(z, cost, step, 8)
54 temp= max(cosz2, cnewcos(z+eradius, cost, step))
55 z = cnewh(z+eradius, cost, step) - eradius
83 real*8 r1, r2, st1, st2, dt
88 call cnewcossin(r1, cosz, leng, r2, cos2, sin2)
94 call cz2t(z, cosz, loca, st1, icon)
96 write(*, *)
' error: in clen2thickT; z=', z,
97 *
' cosz=',cosz,
' leng=', leng
102 if(leng .lt. lenstep)
then 105 call csmll2t(z, cosz, leng, dt)
107 write(*, *)
' small approx dt=', dt,
' for leng=',leng
111 call cz2t(z2, cos2, loca, st2, icon)
113 write(*, *)
' error in clen2thickT; z=', z,
114 *
' cosz=', cosz,
' leng=', leng,
' z2=', z2
129 subroutine csmll2t(h, cosz, s, t)
138 real*8 cs, sn2, ss, sold, eps
141 real*8 f1, f2, rho, rho1, rho2, r
144 real*8 cvh2den, cvh2denp, cvh2den2p
149 f1(ss) = ss*(-cs/2.
d0 + ss*sn2/r/6.
d0)
151 f2(ss) = ss**2* cs*(cs/3.
d0 - ss*sn2/4.
d0/r)
162 t = s*(rho + rho1*f1(s) + rho2*f2(s) )
167 entry csmlt2l(h, cosz, t, s)
179 s =t/ ( rho + rho1*f1(sold) + rho2 *f2(sold)
182 if( abs(s) .lt. 1.
d0 .and. abs(s-sold) .lt. eps)
then 184 elseif(abs( (s-sold)/s ) .lt. eps)
then 193 subroutine cz2t(z, cosz, loca, st, icon)
205 real*8 clenbetween2h, ds, r1, r2, dt
209 call kdwhereis(z, numstep, heighttbl, 1, loca)
210 if(loca .ge. numstep)
then 211 st = thicktbl(numstep)
213 elseif(loca .le. 0)
then 219 write(*,*)
' error in cz2t; z=',z
225 r2 = heighttbl(loca) + eradius
226 ds = clenbetween2h(r2, r1, costbl(loca) )
227 if(ds .lt. lenstep/2)
then 229 call csmll2t(heighttbl(loca), costbl(loca), ds, dt)
230 st = thicktbl(loca) + dt
233 call csmll2t(heighttbl(loca+1), costbl(loca+1), ds, dt)
234 st = thicktbl(loca+1) + dt
242 real*8 function ct2lt(z, cosz, t)
252 real*8 st1, st2, r0, r1, r2, rx, cosx, cos2, sin2
254 real*8 clenbetween2h, cvh2den
259 if(z .eq. zsave)
then 262 call cz2t(z, cosz, loca, st1, icon)
264 write(*,*)
' error in cz2t; z=', z,
' cosz=', cosz
272 call kdwhereis(z, numstep, heighttbl, 1, loca)
273 if(loca .le. 0 .or. loca .ge. numstep)
then 274 write(0,*)
' error in ct2lT',
' z=',z,
'cos=',cosz,
279 rx = heighttbl(loca) + eradius
280 s1 = - clenbetween2h(r0, rx, cosz)
283 call kdwhereis(st2, numstep, thicktbl, 1, loca)
285 if(loca .ge. numstep)
then 287 zsave = heighttbl(numstep)
288 thicksave = thicktbl(numstep)
289 elseif(loca .le. 0.)
then 290 write(*,*)
' error in ct2lT; z=',z,
' t=',t,
' st2=',st2
293 if(t/cvh2den(z) .lt. lenstep .and. cosz .lt. 0.22
d0)
then 294 call csmlt2l(z, cosz, t,
ct2lt)
298 dt = st2 - thicktbl(loca)
299 if(dt .lt. thicktbl(loca+1) - st2)
then 301 call csmlt2l(heighttbl(loca), costbl(loca), dt, s2)
303 rx = heighttbl(loca) + eradius
307 dt = thicktbl(loca+1) - st2
308 call csmlt2l(heighttbl(loca+1), costbl(loca+1),
310 rx = heighttbl(loca+1) + eradius
311 cosx = costbl(loca+1)
314 ct2lt = clenbetween2h(r1, r2, cosz)
subroutine kdwhereis(x, in, a, step, loc)
subroutine cnewcossin(h1, cos1, leng, h2, cos2, sin2)
real *8 function ct2lt(z, cosz, t)
real *8 function clen2thickt(z, cosz, leng)
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
dE dx *! Nuc Int sampling table d
subroutine cz2t(z, cosz, loca, st, icon)
subroutine cl2ttbl(h1, h2, cosz1, cosz2, step, lengtb, htb, costb, thicktb, maxsize, tblsize)
subroutine csmll2t(h, cosz, s, t)