Analytical study of capture time to a horizontal well