4. In $\triangle A B C$, it is known that the sides opposite to $\angle A, \angle B, \angle C$ are $a, b, c$ respectively, and $1+\frac{\tan A}{\tan B}=\frac{2 c}{b}$. Then the size of $\angle A$ is $(\quad$.
(A) $\frac{\pi}{6}$
(B) $\frac{\pi}{4}$
(C) $\frac{\pi}{3}$
(D) $\frac{2 \pi}{3}$
4. C.

Simplifying the equation in the question and combining with the sine formula, we get
$$
\begin{array}{l}
\frac{\sin B \cdot \cos A+\sin A \cdot \cos B}{\sin B \cdot \cos A}=\frac{2 \sin C}{\sin B} \\
\Rightarrow \cos A=\frac{1}{2} \Rightarrow \angle A=60^{\circ} .
\end{array}
$$