anchor.diff:          this_name = trim(adjustl(bez(ix))) // C_NULL_CHAR
   #if defined(FLUKA)
           call ApertureCheckWriteLossParticleF(turn, i, ix, this_name, len_trim(this_name), slos, &
  -     &  fluka_uid(j), fluka_gen(j), fluka_weight(j), &
  -     &  xlos(1)*c1m3, ylos(1)*c1m3, xlos(2)*c1m3, ylos(2)*c1m3, ejfvlos*c1m3, (ejvlos-e0)*c1e6, &
  -     &  -c1m3 * (sigmvlos/clight) * (e0/e0f), naalos, nzzlos)
  +          fluka_uid(j), fluka_gen(j), fluka_weight(j), &
  +          xlos(1)*c1m3, ylos(1)*c1m3, xlos(2)*c1m3, ylos(2)*c1m3, ejfvlos*c1m3, (ejvlos-e0)*c1e6, &
  +          -c1m3 * (sigmvlos/clight) * (e0/e0f), naalos, nzzlos)
   #else
           call ApertureCheckWriteLossParticle(turn, i, ix, this_name, len_trim(this_name), slos, plost(j),&
  -     &  xlos(1)*c1m3, ylos(1)*c1m3, xlos(2)*c1m3, ylos(2)*c1m3, ejfvlos*c1m3, (ejvlos-e0)*c1e6, &
  -     &  -c1m3 * (sigmvlos/clight) * (e0/e0f), naalos, nzzlos)
  +          xlos(1)*c1m3, ylos(1)*c1m3, xlos(2)*c1m3, ylos(2)*c1m3, ejfvlos*c1m3, (ejvlos-e0)*c1e6, &
  +          -c1m3 * (sigmvlos/clight) * (e0/e0f), naalos, nzzlos)
   #endif
         end if
   #endif
  
positive.code: #ifdef FLUKA
        if(nlostp(j).le.aperture_napxStart) then
  #else
        if(((nlostp(j).le.aperture_napxStart) .and. do_coll) &
             .or. .not.do_coll) then
  #endif
           pstop(nlostp(j))=.true.
           ! Record for postpr
           if(.not.limifound.or.kape(ix).eq.0) then
             aperv(nlostp(j),1) = aper(1)
             aperv(nlostp(j),2) = aper(2)
           else
             aperv(nlostp(j),1) = min(ape(1,ix),ape(3,ix))
             aperv(nlostp(j),2) = min(ape(2,ix),ape(4,ix))
           end if
           ixv(nlostp(j))     = ix
           xvl(1,nlostp(j))   = xlos(1)
           xvl(2,nlostp(j))   = xlos(2)
           yvl(1,nlostp(j))   = ylos(1)
           yvl(2,nlostp(j))   = ylos(2)
           dpsvl(nlostp(j))   = dpsvlos
           ejvl(nlostp(j))    = ejvlos
           sigmvl(nlostp(j))  = sigmvlos
           numxv(nlostp(j))   = numx
           nnumxv(nlostp(j))  = numx
  
        end if !  (nlostp(j).le.aperture_napxStart) OR
               ! ((nlostp(j).le.aperture_napxStart) .and. do_coll)
  
  1982  continue
  
  
negative.code: #ifdef FLUKA
    use mod_fluka
  #endif
  #ifdef HDF5
    use hdf5_output
  #endif
  #ifdef ROOT
    use iso_c_binding
    use root_output
  