anchor.diff:        else ! momentum cut
           elens_sig(j)=abs(elens_sig(j))*(elens_optVal(j)*elens_sigdpp(j))
         end if
  +      elens_sig(j)=elens_sig(j)*c1e3
         ! ...and printout:
         write(lout,"(a,i0,a)") "ELENS> Recomputing sigma of e-beam of e-lens #",j," named "//trim(bez(jj))//": "
  -      write(lout,"(a,1pe22.15)") "ELENS> original value [mm]=",oldVal
  -      write(lout,"(a,1pe22.15)") "ELENS> new value [mm]=",elens_sig(j)
  +      write(lout,"(a,1pe22.15)") "ELENS> - original value [sig]=",oldVal
  +      write(lout,"(a,1pe22.15)") "ELENS> - new value [mm]=",elens_sig(j)
       end if
       if(st_debug) then
  -      write(lout,"(a)"         ) "ELENS> using optics:"
  -      write(lout,"(a,1pe22.15)") "ELENS> normalised emittance [m rad]=",elens_emin(j)
  -      write(lout,"(a,1pe22.15)") "ELENS> geometrical emittance [m rad]=",elens_emin(j)/(e0f/nucm0)
  -      write(lout,"(a,1pe22.15)") "ELENS> momentum of reference particle [MeV/c]=",e0f
  -      write(lout,"(a,1pe22.15)") "ELENS> mass of reference particle [MeV/c2]=",nucm0
  -      write(lout,"(a,1pe22.15)") "ELENS> beta/disp function [m]=",elens_optVal(j)
  +      write(lout,"(a)"         ) "ELENS> ...using the following parameters:"
  +      write(lout,"(a,1pe22.15)") "ELENS> - normalised emittance [m rad]=",elens_emin(j)
  +      write(lout,"(a,1pe22.15)") "ELENS> - geometrical emittance [m rad]=",elens_emin(j)/(e0f/nucm0)
  +      write(lout,"(a,1pe22.15)") "ELENS> - momentum of reference particle [MeV/c]=",e0f
  +      write(lout,"(a,1pe22.15)") "ELENS> - mass of reference particle [MeV/c2]=",nucm0
  +      write(lout,"(a,1pe22.15)") "ELENS> - rms of delta distributione []=",elens_sigdpp(j)
  +      write(lout,"(a,1pe22.15)") "ELENS> - beta/disp function [m]=",elens_optVal(j)
       end if
   
       ! compute geometrical normalisation factor
  
positive.code:   end if
   
    write(lout,"(a)") "ELENS> LinOpt for element: '"//trim(bez(iElem))//"'"
    write(lout,"(a,1pe22.15)") "ELENS> recorded value:",elens_optVal(iElem)
    
    if(st_debug) then
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Alpha X/Y:        ",bAlpha
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Beta X/Y:         ",bBeta
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Dispersion X/Y:   ",bDisp
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Dispersion XP/YP: ",bDispP
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Orbit X/Y:        ",bOrbit
      write(lout,"(a,2(1x,f16.6))") "ELENS> DEBUG  * Orbit XP/YP:      ",bOrbitP
    end if
   
  end subroutine elens_setOptics
  
negative.code:           end if
          end if
        end do
        write(lout,"(a,i0,a)") "ELENS> checking consistency of user input data for e-lens #",j," named "//trim(bez(jj))//"..."
        if (elens_r1(j).lt.zero) write(lout,"(a)") "ELENS> ...e-lens has R1<0"
        if (elens_r2(j).lt.zero) write(lout,"(a)") "ELENS> ...e-lens has R2<0"
        if (elens_sig(j).lt.zero) write(lout,"(a)") "ELENS> ...e-lens has sig_el<0"
        if (elens_emin(j).gt.zero.and.elens_sigdpp(j).gt.zero) then
          write(lerr,"(a)") "ELENS> ERROR cannot express R1/R2 cuts in terms of both normalised emittance "// &
                "and rms of delta distribution."
          write(lerr,"(a)") "ELENS>       please choose one of the two!"
          write(lerr,"(a,1pe22.15)") "ELENS>       got emin [m rad]=",elens_emin(j)
          write(lerr,"(a,1pe22.15)") "ELENS>       got sigdpp []=",elens_sigdpp(j)
          call prror
        elseif (elens_emin(j).lt.zero.and.elens_sigdpp(j).lt.zero) then
          write(lerr,"(a)") "ELENS> ERROR cannot express R1/R2 cuts in terms of both normalised emittance "// &
                "or rms of delta distribution without specifying one of the two."
          write(lerr,"(a)") "ELENS>       please choose one of the two!"
          if (elens_emin(j).ne.-one) then
            ! echo value only if non-default one has been given
            write(lerr,"(a,1pe22.15)") "ELENS>       got emin [m rad]=",elens_emin(j)
          end if
          if (elens_sigdpp(j).ne.-one) then
            ! echo value only if non-default one has been given
            write(lerr,"(a,1pe22.15)") "ELENS>       got sigdpp []=",elens_sigdpp(j)
          end if
          call prror
        end if
        if (elens_iSet(j).eq.0) then
  