anchor.diff:    integer, parameter :: nAzimutDef=72              ! default number of points
   
   
  -  ! aperture types  -- kape
  -  ! no aperture     -- 0
  -  ! circle          -- 1
  -  ! rectangle       -- 2
  -  ! ellipse         -- 3
  -  ! rectellipse     -- 4
  -  ! octagon         -- 5
  -  ! racetrack       -- 6
  -  ! transition      -- 7
  -  character(len=2), parameter, dimension(-1:6) :: apeName=(/'TR','NA','CR','RE','EL','RL','OC','RT'/)
  -
     ! precision parameters:
     real(kind=fPrec), parameter :: aPrec=c1m6 ! identify two ap. markers as identical [mm]
     real(kind=fPrec), parameter :: sPrec=c1m7 ! identify two ap. markers as at the same s-pos [m]
  
positive.code:             llos=checkOC(xchk(1), xchk(2), aprr(1), aprr(2), aprr(5), aprr(6) ) .or. &
                isnan_mb(xchk(1)).or.isnan_mb(xchk(2))
            case (6) ! RaceTrack
              llos=checkRT( xchk(1), xchk(2), aprr(1), aprr(2), aprr(3), aprr(3)**2. ) .or. &
                isnan_mb(xchk(1)).or.isnan_mb(xchk(2))
            end select
          end do !do jj=1,niter
  
negative.code: 
    case (6) ! Racetrack
      !   NB: it follows the MadX definition
      apxx = ape(3,ix)**2.
      apyy = ape(4,ix)**2.
      apxy = apxx * apyy
      do j=1,napx
        if((do_coll .and. part_abs_turn(j).eq.0) .or. (.not.do_coll)) then
          if(lapeofftlt(ix)) then
  