Consider a sufficiently nice topological space $X$ as well as topological groups $G$ and $H$. Consider the functor $F$ that associates to $X$ the set of all isomorphism classes of all principal $H$-bundles $\pi\_H\colon P\_H\twoheadrightarrow P\_G$ on all principal $G$-bundles $\pi\_G\colon P\_G\twoheadrightarrow X$ on $X$. I think that this would be representable by the [Brown representability theorem](https://en.wikipedia.org/wiki/Brown%27s_representability_theorem), i.e. there is a topological space $C\_{G,H}$ such that $[X,C\_{G,H}]$ is in bijection with the isomorphism classes of such bundles-over-bundles ([modulo pointed-vs-unpointed spaces](https://mathoverflow.net/questions/285533/classifying-spaces-and-browns-representability-theorem)). But is there an explicit description/characterisation of it?


I am specifically interested in the case where $G=\operatorname U(1)^n$ is a torus (and $H$ is compact Lie); the motivation is that this would describe the so-called [Kaluza–Klein reductions](https://en.wikipedia.org/wiki/Kaluza%E2%80%93Klein_theory) of gauge fields on nontrivially fibred torus compactifications.


As a special case, the subset of $F(X)$ that corresponds to $H$-bundles on the trivial $n$-torus bundle $\operatorname U(1)^n\times X$ is classified by the $n$-fold iterated free loop space $\mathcal L^n\mathrm BG$; and in the case $n=1$ this object is [well studied](https://ncatlab.org/nlab/show/free+loop+space+of+classifying+space). But I don't know how to generalise to arbitary principal torus bundles.



Classifying space of bundles over bundles
If I understand the question right, I think the classifying space can be described like this. Let $Map(G,BH)$ be the space of all continuous maps from $G$ to $BH$. Make the group $G$ act continuously on that function space (using the usual free transitive action of $G$ on the space $G$), and form the associated bundle over $BG$:
$$
EG\times\_G Map(G,BH).
$$


