11 Given $f(x)=\cos 2 x+p|\cos x|+p, x \in \mathbf{R}$. Let the maximum value of $f(x)$ be $h(p)$, then the expression for $h(p)$ is
$11 h(p)=\left\{\begin{array}{ll}p-1, & p<-2, \\ 2 p+1, & p \geqslant-2 .\end{array}\right.$

That is, $h(p)=\left\{\begin{array}{ll}p-1, & p<-2, \\ 2 p+1, & p \geqslant-2 .\end{array}\right.$