5 subroutine cthick2len(aTrack, tin, leng, t, jcut)
32 real*8 z, cosz, tin, leng, t
40 real*8 cvh2den, s, cnewcos, cnewh, zp, cosp
41 real*8 cutf/5./, cthick2h
72 real*8 f1, f2, int1, int2, rp
73 real*8 cvh2denp, cvh2den2p, rho, rhop, d, cvh2thick
76 real*8 nearv/0.5/, nearv2/0.99/, t1, t2
78 integer i, icon, iterate
80 f1(s) = -s**2/2*cosp + s**3/rp/6.
d0 * (1.
d0-cosp**2)
83 f2(s) = s**3/3.
d0 * cosp**2
88 cosz = atrack%vec%coszenith
89 if( atrack%p%code .eq.
kneumu .or.
90 * atrack%p%code .eq.
kneue )
then 103 if(usetbl .and. z .lt. htop )
then 105 elseif(abs(cosz) .gt. nearv)
then 106 maxact = 20*maxkgm2 *(abs(cosz) - nearv) + maxkgm2
111 if(t .eq. maxact)
then 117 if(.not. (usetbl .and. z .lt. htop) .and.
118 * (abs(cosz) .lt. nearv) )
then 120 t = min(t, cvh2thick(z)/cutf/(abs(cosz) + .1) )
128 if(usetbl .and. z .lt. htop)
then 132 elseif( abs(cosz) .gt. nearv )
then 142 call clenbetw2h(z+eradius, zp+eradius, cosz, leng, icon)
150 if( t .gt. 350.
d0 )
then 152 cosp = cnewcos(z+eradius, cosz, leng/2)
158 zp = cnewh(z+eradius, cosz, leng) - eradius
160 t =( t2 - t1 )/((cosz+cosp)/2)
176 if( iterate .ne. 0)
then 180 if(cosz .le. 0.
d0 .or. rhop .le. 1.0d-18)
then 183 d = rho**2 - 2* rhop *cosz * t
184 s = (rho -sqrt(d) )/ rhop/cosz
188 if(rhop .gt. 1.0d-18)
then 191 cosp = cnewcos(eradius+z, cosz, s/2)
192 zp = cnewh(eradius+z, cosz, s/2) - eradius
203 int1 = f1(s/2) - f1(-s/2)
204 int2 = f2(s/2) - f2(-s/2)
206 s = (t - cvh2denp(zp)*int1 - cvh2den2p(zp)*int2/2)
213 if(leng .le. 0.)
then subroutine cthick2len(aTrack, tin, leng, t, jcut)
block data cblkIncident data *Za1ry *HeightOfInj d3
max ptcl codes in the kneue
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
max ptcl codes in the kneumu
subroutine clenbetw2h(h1, h2, cost, leng, icon)