  This is a continuation of the sequence of papers \cite{HN2}, \cite{H99} in
the study of the cocenters and class polynomials of affine Hecke algebras $\ch$
and their relation to affine Deligne-Lusztig varieties. Let $w$ be a $P$-alcove
element, as introduced in \cite{GHKR} and \cite{GHN}. In this paper, we study
the image of $T_w$ in the cocenter of $\ch$. In the process, we obtain a
Bernstein presentation of the cocenter of $\ch$. We also obtain a comparison
theorem among the class polynomials of $\ch$ and of its parabolic subalgebras,
which is analogous to the Hodge-Newton decomposition theorem for affine
Deligne-Lusztig varieties. As a consequence, we present a new proof of
\cite{GHKR} and \cite{GHN} on the emptiness pattern of affine Deligne-Lusztig
varieties.
