anchor.diff:              Dxp = (Length-Lrefl)/c_rcurv
               x   = x + sin_mb(half*Dxp+xp)*Rlength ! Trajectory at channeling exit
               y   = y + red_S*yp
  -            xp  = Length/c_rcurv + (half*ran_gauss(one))*xpcrit ! [mrad]
  +            xp  = Length/c_rcurv + (half*ran_gauss(zero))*xpcrit ! [mrad]
   
               call cry_calcIonLoss(is,pc,rlength,dest)
               pc = pc - (half*dest)*Rlength  ! "added" energy loss once captured
  
positive.code:   pc  = pc - dei*dz ! Energy lost because of ionization process[GeV]
  
    dya   = (13.6_fPrec/pc)*sqrt(dz/dlr) ! RMS of coloumb scattering MCS (mrad)
    kxmcs = dya*ran_gauss(one)
    kymcs = dya*ran_gauss(one)
  
    xp = xp+kxmcs
    yp = yp+kymcs
  
negative.code:       teta = sqrt(t)/pc
      end if
  
      tx = (teta*ran_gauss(zero))*c1e3
      tz = (teta*ran_gauss(zero))*c1e3
  
      ! Change p angle
      xp = xp + tx
  