anchor.diff:      call merlinscatter_get_sd_t(k2coll_gettran)
       p = p * (one - (xm2/ecmsq))
     case(5)
  -    length = 1
  -    call funlux(cgen(1,mat), xran, length)
  -    truth = xran(1)
  -    t = truth
  -    k2coll_gettran = t
  +    call funlux(cgen(1,mat), xran, 1)
  +    k2coll_gettran = xran(1)
     end select
   #endif
   
  
positive.code:   integer,          intent(in)    :: xmat
    real(kind=fPrec), intent(inout) :: p
  
    real(kind=fPrec) t,xm2,bsd,truth,xran(1)
    integer length
  
    ! Neither if-statements below have an else, so defaulting function return to zero.
    k2coll_gettran = zero
  
negative.code:   select case(inter)
    case(2) ! Nuclear Elastic
      k2coll_gettran = (-one*log_mb(rndm4()))/bn(xmat)
    case(3) ! pp Elastic
      k2coll_gettran = (-one*log_mb(rndm4()))/bpp
    case(4) ! Single Diffractive
      xm2 = exp_mb(rndm4() * xln15s)
      p   = p * (one - xm2/ecmsq)
      if(xm2 < two) then
        bsd = two * bpp
      else if(xm2 >= two .and. xm2 <= five) then
        bsd = ((106.0_fPrec - 17.0_fPrec*xm2)*bpp)/36.0_fPrec
      else
        bsd = (seven*bpp)/12.0_fPrec
      end if
      k2coll_gettran = (-one*log_mb(rndm4()))/bsd
    case(5) ! Coulomb
      call funlux(cgen(1,mat), xran, 1)
      k2coll_gettran = xran(1)
    end select
  #else
    select case(inter)
  