anchor.diff:    implicit none
     integer ix
     real(kind=fPrec) tilt, xoff, yoff
  -  ape(7,ix)=tilt
  -  ape(8,ix)=xoff
  -  ape(9,ix)=yoff
  -  lapeofftlt(ix)=ape(7,ix).ne.zero.or.ape(8,ix).ne.zero.or.ape(9,ix).ne.zero
  +  ape( 9,ix)=tilt
  +  ape(10,ix)=xoff
  +  ape(11,ix)=yoff
  +  lapeofftlt(ix)=ape(9,ix).ne.zero.or.ape(10,ix).ne.zero.or.ape(11,ix).ne.zero
   end subroutine aperture_initroffpos
   
   
  
positive.code:   return
  end subroutine intersectRT
  
  subroutine intersectTR( xRay, yRay, thetaRay, xRe, yRe, aa, bb, mOct, qOct, xChk, yChk, nChk )
    ! 0.0<=thetaRay<=2pi!!!!!
    implicit none
    ! interface variables
    real(kind=fPrec) xRay, yRay, thetaRay, xRe, yRe, aa, bb, mOct, qOct, xChk, yChk, nChk
    ! temp variables
    real(kind=fPrec) xTmp(2), yTmp(2), nTmp(2)
    call intersectRE( xRay, yRay, thetaRay, xRe, yRe, xTmp(1), yTmp(1), nTmp(1) )
  
negative.code:   return
  end function checkCR
  
  logical function checkTR( x, y, aprx, apry, apex, apey, apxx, apyy, apxy, aptx, apty, m, q )
  !-----------------------------------------------------------------------
  !     A.Mereghetti (CERN, BE/ABP-HSS)
  !     last modified: 16-01-2019
  