[@Loo], Looijenga–Rapoport [@LooRap] and Saper–Stern [@SaSt] if $X_K$ has the structure of a complex algebraic variety and by Saper [@Saper] in general. In particular, by comparing the formulas for the action of a Hecke operator on weighted cohomology (this was calculated by Goresky and MacPherson using topological methods in [@GM]) and on $L^2$-cohomology (this was calculated by Arthur using the Arthur–Selberg trace formula in [@A-L2]), we obtain a formula for averaged discrete series characters of the group $G({{\mathbb{R}}})$. One of the goals of the paper [@GKM] of Goresky–Kottwitz–MacPherson was to prove this identity directly.

If moreover the space $X_K$ is the set of complex points of a Shimura variety, then it descends to an algebraic variety over an explicit number field $E$ known as the reflex field, as does the minimal Satake compactification, and so the intersection cohomology has a natural action of the absolute Galois group $\operatorname{Gal}(\overline{E}/E)$. We can further complicate the calculation by trying to calculate the trace on $IH^*(\overline{X}_K)$ of Hecke operators twisted by elements of the group $\operatorname{Gal}(\overline{E}/E)$, for example, powers of Frobenius maps. In the case where $X_K$ is a Siegel modular variety, this was done by the second author in [@Morel]. It requires a 