函数 $f(x)=\left\{\begin{array}{l}\frac{1}{\sqrt{1+x^2}}, \quad x \leq 0, \\ (x+1) \cos x, x>0\end{array}\right.$ 的一个原函数为
A. ${F}(x)= \begin{cases}\ln \left(\sqrt{1+x^2}-x\right), & x \leq 0 \\ (x+1) \cos x-\sin x, & x>0\end{cases}$
B. $F(x)=\left\{\begin{array}{l}\ln \left(\sqrt{1+x^2}-x\right)+1, x \leq 0 \\ (x+1) \cos x-\sin x, x>0\end{array}\right.$
C. $F(x)= \begin{cases}\ln \left(\sqrt{1+x^2}+x\right), & x \leq 0 \\ (x+1) \sin x+\cos x, & x>0\end{cases}$
D. $F(x)=\left\{\begin{array}{l}\ln \left(\sqrt{1+x^2}+x\right)+1, x \leq 0 \\ (x+1) \sin x+\cos x, x>0\end{array}\right.$