anchor.diff:  
     if(firstrun) then
       if(rselect > 0 .and. rselect < 65) then ! The value rselect is fixed to 64, this if is probably redundant.
  +      if(iturn == 1) then
  +        sum_ax(ie) = zero
  +        sum_ay(ie) = zero
  +      end if
  +  
         do j=1,napx
           xj  = (xv1(j)-torbx(ie)) /c1e3
           xpj = (yv1(j)-torbxp(ie))/c1e3
           yj  = (xv2(j)-torby(ie)) /c1e3
           ypj = (yv2(j)-torbyp(ie))/c1e3
           pj  = ejv(j)/c1e3
  -
  -        if(iturn == 1 .and. j == 1) then
  -          sum_ax(ie) = zero
  -          sum_ay(ie) = zero
  -        end if
   
           if(tbetax(ie) > 0.) then
             gammax = (one + talphax(ie)**2)/tbetax(ie)
  
positive.code:     gammax = (one + talphax(ie)**2)/tbetax(ie)
      gammay = (one + talphay(ie)**2)/tbetay(ie)
  
      do j=1,napx
        xj  = (xv1(j)-torbx(ie))/c1e3
        xpj = (yv1(j)-torbxp(ie))/c1e3
        yj  = (xv2(j)-torby(ie))/c1e3
        ypj = (yv2(j)-torbyp(ie))/c1e3
        pj  = ejv(j)/c1e3
  
        if(firstrun) then
          if(iturn == 1 .and. j == 1) then
            sum_ax(ie) = zero
            sum_ay(ie) = zero
          end if
        end if
  
        if(part_abs_pos(j) == 0 .and. part_abs_turn(j) == 0) then
          nspx         = sqrt(abs(gammax*(xj)**2 + two*talphax(ie)*xj*xpj + tbetax(ie)*xpj**2)/myemitx0_collgap)
  
negative.code:     gammax = (one + talphax(ie)**2)/tbetax(ie)
      gammay = (one + talphay(ie)**2)/tbetay(ie)
  
      if(iturn == 1) then
        sum_ax(ie) = zero
        sum_ay(ie) = zero
      end if
  
      do j=1,napx
        xj  = (xv1(j)-torbx(ie))/c1e3
        xpj = (yv1(j)-torbxp(ie))/c1e3
        yj  = (xv2(j)-torby(ie))/c1e3
        ypj = (yv2(j)-torbyp(ie))/c1e3
        pj  = ejv(j)/c1e3
  
        ! DRIFT PART
        if(stracki == zero) then
  