TITLE: How does $f_* O_X$ measure ramification and Grothendieck-Riemann-Roch
QUESTION [10 upvotes]: Let $f:X\longrightarrow Y$ be a finite morphism of smooth projective varieties over a field $k$ of characteristic zero, where $\dim X=\dim Y$. Then $f$ is flat. Hence $f_\ast \mathcal{O}_X$ is a coherent locally free sheaf on $Y$.
Now, my question is based on the following example. (For simplicity, take $k=\overline{k}$.)
Example. Suppose that $\dim X =\dim Y = 1$ (i.e., curves). Apply Grothendieck-Riemann-Roch to $f$ and $\mathcal{O}_X$. In degree 0, we get the fact that $\textrm{deg} \ f = \textrm{rk} \ f$. In degree 1 we get a "Hurwitz theorem". In fact, with little effort the formula reads $$2c_1(f_\ast \mathcal{O}_X) =\deg f \cdot K_Y -  f_\ast(K_X) = f_\ast(-R), $$ where $R$ is the ramification divisor on $X$.
Now for my two questions that are based on this formula.
Q1. The divisor $R$ is not called the ramification divisor for nothing. Its support is the set of ramification points and the multiplicity of $R$ at a point $P$ is precisely $e_P-1$. So in my opinion, it "measures" the ramification. What about $c_1(f_\ast \mathcal{O}_X) = c_1(\det f_\ast \mathcal{O}_X)$? How does he "measure" the ramification? (I'm probably missing something really elementary here.)
Q2. In higher-dimensions, if I understand correctly, one should get a "higher-dimensional" Hurwitz formula:  $$2c_1(f_\ast \mathcal{O}_X) =f_\ast(\textrm{td}(X/Y)).$$ I doubt that this "measures" all the ramification. And, to be frank, I don't really know what it "measures". Can anyone provide some insight?

REPLY [9 votes]: The following does not exactly answer your question, but you may find it interesting. It is the Riemann-Hurwitz formula for surfaces.
Let $\phi:S_1\to S_2$ be a finite morphism between smooth, projective surfaces (over an algebraically closed field of characteristic zero) of degree $n$, and let $B\subseteq S_2$ be the set of $y\in S_2$ such that $\phi^{-1}(y)$ does not contain $n$ points (i.e. $B$ is the ramification locus). Zariski's purity theorem states that $B$ is pure of dimension one; let $B_1,\dots,B_r$ be its irreducible components, and let $n_i$ be the degree of the morphism $\phi|_{\phi^{-1}(B_i)}:\phi^{-1}(B_i)\to B_i$. Then
$$\chi(S_1)=\chi(S_2)\deg \phi-\sum_{i=1}^r(n-n_i)\chi(B_i)+\sum_{y\in B}\left(|\phi^{-1}(y)|-n+\sum_{i=1}^r(n-n_i)m_i(y)\right)$$
where $m_i(y)$ denotes the number of local branches of $B_i$ at $y$. Here $\chi$ is the $\ell$-adic Euler characteristic of the surface ( topological Euler characteristic if $k=\mathbb{C}$), which can be translated into a Chern class if you prefer.
The proof is B. Iversen, 'Numerical invariants and multiple planes', Amer. J. Math. 92 (1970), 968-996. When $k=\mathbb{C}$, you can prove it by thinking of the topological Euler characteristic as a measure on constructible sets (e.g. O. Ya. Viro, Some integral calculus based on Euler characteristic); then the formula is equivalent to Fubini's theorem ($\int\int dxdy=\int\int dydx$) for the graph of $\phi$.