21 real*8 g, u, gbeta, dedt, dedtf, dedl, ctau, rho
22 real*8 a, x, p, gmin, ctaumax, pmin, cvh2den
25 data gmin/200.
d0/, ctaumax/50.
d0/, pmin/10.
d0/
27 if(atrack%p%fm%p(4) .lt. atrack%p%mass)
then 28 atrack%p%fm%p(4) = atrack%p%mass
32 if(ctau .eq. infty)
then 35 g = atrack%p%fm%p(4)/atrack%p%mass
38 length = - ctau* g *log(u)
40 gbeta = sqrt(g**2-1.
d0)
43 if(atrack%p%charge .eq. 0 .or. ctau .lt. ctaumax)
then 45 length = - ctau * gbeta * log(u)
46 elseif(fromepics)
then 53 length = - ctau * gbeta * log(u)
56 length = - ctau * gbeta * log(u)
113 real*4 int1, int2, ans, xm, tf, rf, p
121 if(p .le. 0.1
d0)
then 124 ans =((-0.57001
e-02*p + 0.12049 )*p+1.3470)*p
131 int2 = 2.0**p/p * (g**p - xm**p)
138 if(u .lt. int1/(int1+int2))
then 141 int1 = sqrt(2.0*(xm-1.0))
143 int2 = 2.0**p/p *(xm**p-1.0)
145 if(int1 .eq. 0. .and. int2 .eq. 0.)
then 153 if(u .lt. int1 /(int1+int2))
then 156 x = (u*int1)**2/2.0+1.0
160 x =( p*int2*u/2.0**p+ 1.)**(1./p)
162 if(x .eq. 1.0)
goto 10
164 tf = 1./(x-sqrt(x*x-1.0))**p/sqrt(x*x-1.0)
165 rf = (2.0*x)**p/x + 1.0/sqrt(2*(x-1.0))
166 if(u .lt. tf/rf)
goto 10
172 x =( p*int2*u/2.0**p+ xm**p)**(1./p)
subroutine cerrormsg(msg, needrtn)
dE dx *! Nuc Int sampling table e
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
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
subroutine cdecaywel(pin, g, x)
subroutine cgetctau(proj, ctau)
subroutine cdecayleng(aTrack, length)