anchor.diff:        xbb_d=sigmanq(2,imbb(i))*xrb_d
         zbb_d=sigmanq(1,imbb(i))*zrb_d
         call errf(zbb_d,xbb_d,cbzb_d,cbxb_d)
  +
       else if(ibtyp.eq.1) then
         r2b_d=two*(sigman2(2,imbb(i))-sigman2(1,imbb(i)))
         rb_d=sqrt(r2b_d)
  
positive.code:       tkb_d=(crkveb_d**2/sigman2(1,imbb(i))+cikveb_d**2/sigman2(2,imbb(i)))*half                              !hr03
        xbb_d=sigmanq(2,imbb(i))*xrb_d
        zbb_d=sigmanq(1,imbb(i))*zrb_d
  
  
      endif
    endif
    beamoff(4,imbb(i))=(rkb_d*(crzb_d-exp_mb(-one*tkb_d)*cbzb_d))*sign(one,crkveb_d)
  
negative.code:           endif
  
                   !hr08
  strack(i)=crad*ptnfac(ix)
  if(ibbc.eq.0) then
    crkveb_d=parbe(ix,5)
    cikveb_d=parbe(ix,6)
  