Given a space $X$, I am looking for a characterization of classes $\alpha \in H^n(X;\bf Q)$ such that there is a map $f\colon T^n \to X$ so that $f^{\ast} \alpha$ pairs non-trivially against the fundamental class of $T^n = (S^1)^n$. Let us denote the subset of such classes by $T^\*(X) \subset H^\*(X;\bf Q)$. 


Here are a few observations that might be helpful:


1) Since there is a degree 1 map $T^n \to S^n$, all classes that are detected by the image of the Hurewicz $\pi\_n(X) \to H\_n(X;\bf Q)$ are contained in $T\_n(X)$. The examples $X = T^n$ and $X= $ a surface of genus $g > 1, n = 2$ show that $T^n(X)$ might contain more than these classes, but does not have to equal all of $H^n(X)$, in general.


2) There are obstructions coming from the algebraic structure of $H^{\ast}(X;\bf Q)$, for instance the above observation about the fundamental class of higher genus surfaces can be proven this way.


3) An application of Gromov's hyperbolization technique shows that every cohomology class can be detected by some aspherical manifold. The question asks when a torus works.



Which cohomology classes are detected by tori?
I'd prefer to work in homology (with coefficients $\mathbb{Q}$ everywhere). I'll say that a class $x\in H\_k(X)$ is *basically toral* if there is a map $f\colon T^k\to X$ sending the fundamental class of $T^k$ to $x$. I'll say that $x$ is *toral* if it is a linear combination of basically toral classes, and I'll write $T\_\*(X)$ for the group of toral classes. This is clearly a subfunctor of $H\_\*(X)$, and $T^\*(X)$ is the complement of the annihilator of $T\_\*(X)$. I'll say that $X$ is *toral* if $T\_\*(X)=H\_\*(X)$. It is easy to see that $T^n$ is toral and thus that $T\_\*(X)$ is the sum of the images $f\_\*(H\_\*(T^n))$ for all maps $f\colon T^n\to X$. This makes it clear that $T\_\*(X)$ is a subcoalgebra of $H\_\*(X)$, and also that $T\_\*(X\times Y)$ contains $T\_\*(X)\otimes T\_\*(Y)$. From this it follows that the class of toral spaces is closed under products. It is also easily seen to be closed under disjoint unions. Also, if $f\colon X\to Y$ and $X$ is toral and $f\_\*\colon H\_\*(X)\to H\_\*(Y)$ is surjective then $Y$ is toral. Using this we see that the class of toral spaces is closed under wedges and smash products.


Note also that if $G$ is a connected Lie group and $T$ is a maximal torus in a maximal compact subgroup of $G$, then the inclusion $i\colon T\to G$ gives a surjection of rational homology groups. It follows that all connected Lie groups are toral, and the connectivity constraint is easily removed.


Next, there is an $H\_\*$-epimorphism $T^n\to S^n$, so spheres are toral, so products of spheres are toral. 


Now let $X$ be a connected toral space. Using the James construction, we see that there is a family of maps $X^k\to\Omega\Sigma X$ that are jointly surjective in homology, so $\Omega\Sigma X$ is again toral. There is a standard map $\Omega\Sigma S^2\to\mathbb{C}P^\infty$ that gives an isomorphism in rational homology, so the space $\mathbb{C}P^\infty=BU(1)$ is toral. It follows that for any $n$ the space $BT^n=BU(1)^n$ is toral. By considering maximal tori again, we see that $BG$ is toral for any connnected Lie group $G$. In particular, the infinite Grassmannian $BU(n)=\text{Grass}\_n(\mathbb{C}^\infty)$ is toral. 


Now suppose that $X$ is toral and that $Y$ is a homological $d$-skeleton of $X$, meaning that $Y$ is a $d$-skeleton with respect to some CW structure and that the map $i\_\*\colon H\_\*(Y)\to H\_\*(X)$ is injective. If $y\in H\_k(Y)$ then wlog $k\leq d$ and we can express $i\_\*(y)$ as a linear combination of terms carried by maps $f\_j\colon T^k\to X$. All these maps $f\_j$ can be deformed so that they land in $Y$, and using this, we see that $y$ is toral. As $y$ was arbitrary we deduce that $Y$ is toral. In particular, we can take $X=\mathbb{C}P^\infty$ to see that the space $\mathbb{C}P^m=\text{Grass}\_1(\mathbb{C}^{m+1})=U(m+1)/(U(1)\times U(m))$ is toral. I would guess that all homogeneous spaces $G/H$ (with $G$ a compact Lie group and $H$ a closed subgroup) are toral, but I do not immediately see a proof. This would include the finite Grassmannians $G\_k(\mathbb{C}^m)$ for example. Toric varieties would be another interesting test case.


Now let $X$ be a connected infinite loop space, so $X\simeq\Omega^\infty T$ for some $0$-connected spectrum $T$. By standard arguments in stable homotopy, we can choose a wedge of spheres $W$ and a map $f\colon W\to T$ that gives an isomorphism $\pi\_\*(W)\otimes\mathbb{Q}\to\pi\_\*(T)\otimes\mathbb{Q}$, or equivalently an isomorphism $H\_\*(W)\to H\_\*(T)$. This gives a map from the space $Y=\Omega^\infty W$ to $X$ that is surjective in rational homology. Now $Y$ is a filtered colimit of finite products of spaces of the form $QS^{2n+1}$ or $QS^{2n+2}$. There are $H\_\*$-epimorphisms $S^{2n+1}\to QS^{2n+1}$ and $\Omega\Sigma S^{2n+2}\to QS^{2n+2}$, and using these we see that $Y$ is toral, and thus that $X$ is toral. Again, the connectivity constraint is easily removed.


For an interesting example in the opposite direction, I would like to consider the configuration space $F\_n\mathbb{C}$ of $n$-tuples of distinct points in $\mathbb{C}$. There is a well-known calculation of the cohomology: it has generators $a\_{pq}\in H^1$ for $1\leq p,q\leq n$ subject to $a\_{pp}=0$ and $a\_{pq}=a\_{qp}$ and $a\_{pq}^2=0$ and $a\_{pq}a\_{qr}+a\_{qr}a\_{rp}+a\_{rp}a\_{pq}=0$. The space can also be described as $B\Gamma\_n$, where $\Gamma\_n$ is the braid group on $n$ strings, so $[T^k,F\_n\mathbb{C}]=\text{Hom}(\mathbb{Z}^k,\Gamma\_n)/\text{conjugacy}$. From this one can probably work out $T\_\*(F\_n\mathbb{C})$ and prove that it is not equal to $H\_\*(F\_n\mathbb{C})$ when $n>2$, but I am not sure of the details. Other discrete groups such as mapping class groups, automorphisms of free groups and $GL\_n(\mathbb{Z})$ may also be interesting test cases. The question mentions compact oriented surfaces, which can also be seen as classifying spaces of discrete groups.


Along the same lines, we can describe $T^n\vee T^n$ as $B(\mathbb{Z}^n\*\mathbb{Z}^n)$ (where $\*$ denotes free product of groups). As the free product is highly non-commutative, there are not so many homomorphisms $\mathbb{Z}^m\to\mathbb{Z}^n\*\mathbb{Z}^n$. Using this, I think we can show that the sum of the two top classes in $H\_n(T^n\vee T^n)$ is not basically toral, so we do not get a good theory by restricting to the basically toral case.


