anchor.diff:    end if
   
     ! Copy new particles to tracking arrays. Also add the orbit offset at start of ring!
  -  if(do_thisdis /= 0) then
  +  if(do_thisdis /= 0 .or. radial) then
       xv1(1:napx00)   = c1e3 *  myx(1:napx00) + torbx(1)
       yv1(1:napx00)   = c1e3 * myxp(1:napx00) + torbxp(1)
       xv2(1:napx00)   = c1e3 *  myy(1:napx00) + torby(1)
  
positive.code:     ejv(1:napx00)   = myp(1:napx00)
    end if
  
    do i = 1, napx00
      ! FOR NOT FAST TRACKING ONLY
      ejfv(j)=sqrt(ejv(j)**2-nucm(j)**2)
      rvv(j)=(ejv(j)*e0f)/(e0*ejfv(j))
      dpsv(j)=(ejfv(j)*(nucm0/nucm(j))-e0f)/e0f
      oidpsv(j)=one/(one+dpsv(j))
      moidpsv(j)=mtc(j)/(one+dpsv(j))
      omoidpsv(j)=c1e3*((one-mtc(j))*oidpsv(j))
      dpsv1(j)=(dpsv(j)*c1e3)*oidpsv(j)
  
      partID(i)=i
      parentID(i)=i
  
      do ieff =1, numeff
        counted_r(i,ieff) = 0
        counted_x(i,ieff) = 0
        counted_y(i,ieff) = 0
  
        do ieffdpop =1, numeffdpop
          counted2d(i,ieff,ieffdpop) = 0
        end do
  
      end do
  
      do ieffdpop =1, numeffdpop
        counteddpop(i,ieffdpop) = 0
      end do
  
    end do
  
  !!!!!!!!!!!!!!!!!!!!!!START THIN6D CUT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
negative.code:   use mod_commons
    use mod_common_track
    use mod_common_da
    use mod_particles
  
    implicit none
  
  