	subroutine efield(z,y,Ez,Ey)
C in: coordinatas z,y in meter with respect to tube centre
C out: the corresponding field Ez, Ey in V/meter

C parameters: --------------------------------------------------
        b=15. ! drift tube radius
	V=3000. ! operating voltage
        c=0.5   ! wire displacement from centre in Y (mm)
        delta=0.050 ! wire thickness in mm
C --------------------------------------------------------------

        e0=8.8542E-12 ! permittivity
C go to meter
	b=b/1000.
        c=c/1000.
        delta=delta/1000.
C	tau=charge density per unit wire lenthgt
        tau=2.*3.1415927*e0*V/log( (b*b-c*c)/(b*delta) )
        d=b*b/c ! position of mirror charge
        if (c.eq.0) d=99999999.
	Ez=tau/2./3.1415927/e0
        Ey=Ez
        Ez=Ez*( z/((y-c)**2+z*z) - z/((y-d)**2+z*z) )
        Ey=Ey*( (y-c)/((y-c)**2+z*z) - (y-d)/((y-d)**2+z*z) )
	end

