# Compute characteristic classes of principal bundle over surfaces

Let $G$ be a connected Lie group and $\Sigma$ a closed surface. We know that principal $G$-bundles $P$ can be topologically classified by a characteristic class $c(P)\in H^2(\Sigma,\pi_1G)\cong\pi_1G$. (One of the argument for this is here.

The following is my question:

Let $G$ be a semisimple connected (or even compact) Lie group, $\beta\colon\pi_1(\Sigma)\to G$ a group homomorphism, and $\Sigma$ a closed oriented surface. Consider the universal cover $\tilde{\Sigma}\to\Sigma$ which is a principal $\pi_1(\Sigma)$-bundle. Form the associated bundle $\tilde{\Sigma}\times_\beta G$ which is necessarily a principal $G$-bundle over $\Sigma$. Hence, it should have a characteristic class $c(\tilde{\Sigma}\times_\beta G)\in H^2(\Sigma,\pi_1G)\cong\pi_1G$. Is there a way to compute this characteristic class in terms of $\beta$?

The difficulty here is that $\pi_1(\Sigma)$ is not connected, and hence I cannot use the functoriality of the characteristic class. Another one is that I am not sure how to compute the induced map $B\beta\colon B\pi_1(\Sigma)\to BG$ concretely.

Any idea or reference is greatly appreciated!