7. $\pi f(x)=\cos 2 x-2 \sqrt{3} \sin x \cos x=\cos 2 x-\sqrt{3} \sin 2 x=2 \cos \left(2 x+\frac{\pi}{3}\right)$ Therefore, $T=\pi$
7. (2004 National College Entrance Examination - Beijing Paper) The smallest positive period of the function $f(x)=\cos 2 x-2 \sqrt{3} \sin x \cos x$ is