anchor.diff:              y= y + yp * Sdech
   !            write(*,*) "Ldech", Ldech
   !            write(*,*) "DESt", DESt
  -!            CALL CALC_ION_LOSS_CRY(IS,PC,Ldech,DESt)
  +            CALL CALC_ION_LOSS_CRY(IS,PC,Ldech,DESt)
               PC = PC - 0.5*DESt*Ldech          ! energy loss to ionization while in CH [GeV]
   
               x = x + 0.5*(s_length-Sdech)*xp
               y = y + 0.5*(s_length-Sdech)*yp
   
   !            write(*,*) "s_length-Sdech", s_length-Sdech
  -!            CALL CALC_ION_LOSS_CRY(IS,PC,s_length-Sdech,DESt)
  +            CALL CALC_ION_LOSS_CRY(IS,PC,s_length-Sdech,DESt)
               CALL MOVE_AM_(IS,NAM,s_length-Sdech,DESt,DLYi(IS),DLRi(IS),xp,yp,PC)
              !next line new from sasha
   !            PC = PC - 0.5*DES(IS)*y          ! energy loss to ionization [GeV]
  
positive.code:       double precision s_length             !element length along s
        double precision Alayer               !amorphous layer [m]
        integer C_orient                      !crystal orientation
        integer IS                            !index of the material
  !      integer counter
        double precision  DLRI(4),DLYI(4),AI(4),DES(4)!cry parameters:see line~270
        double precision DESt                  ! Daniele: changed energy loss by ionization now calculated and not tabulated
  
negative.code:         CALL MOVE_AM_(IS,NAM,s_length,DESt,DLYi(IS),DLRi(IS), xp,yp,PC)
          WRITE(*,*)'Fix here!'
          GOTO 111
        END IF
  !
  ! THIRD CASE: the p interacts with the crystal.
  