I am studying anomalous $U(1)$'s, related to the strong CP problem, and I have some trouble with the origin of the parameter $\bar{\theta}$.
We start with the QCD Lagrangian with the topological term: $$ \mathcal{L}_{QCD}= -\frac{1}{4}F_{\mu\nu}F^{\mu\nu}+\theta \epsilon^{\mu\nu\rho\lambda}F_{\mu\nu}F_{\rho\lambda}+\big(i\bar{\chi}_L^f\bar{\sigma}^\mu D_\mu\chi_L^f-\bar{\chi}_L^f M_{ff'}\chi_R^{f'}+\mathrm{h.c.}\big) $$ where $\chi_{L,R}^f$ are chiral Weyl fermions (a sum over the flavours $f$ is understood). At this point, we have a classical $U(1)_{chiral}$ symmetry: $$ \chi_L^f\to e^{i\alpha}\chi_L^f\qquad\chi_R^f\to e^{-i\alpha}\chi_R^f\qquad \forall f \text{ and } \alpha\in\mathbb{R} $$ At the quantum level, it is anomalous, and we have $$ \partial_\mu J^\mu=\mathcal{A}=C\epsilon^{\mu\nu\rho\lambda}F_{\mu\nu}F_{\rho\lambda} $$ In the path integral formalism, it translates to a non-invariant measure: $$ \prod_f\mathcal{D}\chi_L^f\mathcal{D}\chi_R^f\to \prod_f\mathcal{D}\chi_L^f\mathcal{D}\chi_R^f ~ \exp \left( i\int \! d^4x \, \, \alpha \, C\epsilon^{\mu\nu\rho\lambda}F_{\mu\nu}F_{\rho\lambda} \right) $$ This means that effectively, a $U(1)$ transformation shifts the theta parameter: $$ \theta \to \theta+\alpha $$
To get the physical $\bar{\theta}=\theta-\arg(\det M)$ parameter, I then guess that I'm supposed to do a transformation with parameter $\alpha=-\arg(\det M)$, however, I don't see how that gives me a diagonalised real mass matrix . I think I'm missing something rather simple, but I fail to see it...