I very important example of topological field theories are "BF-theories", which are usually defined as follows: Let $G$ be a Lie group with Lie algebra $\mathfrak{g}$ and let $\pi:P\to\mathcal{M}$ be a principal $G$-bundle over a compact smooth manifold $\mathcal{M}$. Furthermore, let $\langle\cdot,\cdot\rangle$ be an $\mathrm{Ad}$-invariant non-degenerate symmetric bilinear form on $\mathfrak{g}$. The action of a BF-theory is then defined to be
$$S_{\mathrm{BF}}[B,A]:=\int_{\mathcal{M}}\! \operatorname{tr}(B\wedge F[A]),$$
where $B\in\Omega^{2}(\mathcal{M},\mathrm{Ad}(P))$ is an $\mathrm{Ad}(P)$-valued $(d-2)$-form and where $A\in\Omega^{1}(P,\mathfrak{g})$ is a connection $1$-form. (We view the curvature $F[A]:=\mathrm{d}A+\frac{1}{2}[A\wedge A]$ as an element of $\Omega^{2}(\mathcal{M},\mathrm{Ad}(P))$).
Does anyone know how the trace above is define? I haven't found an explicit definition in the literature. My guess would be the following:
The map $\mathrm{tr}(\cdot\wedge\cdot):\Omega^{d-2}(\mathcal{M},\mathrm{Ad}(P))\times\Omega^{2}(\mathcal{M},\mathrm{Ad}(P))\to\Omega^{d}(\mathcal{M})$ is the map defined locally on an open subset $U\subset\mathcal{M}$ as \begin{align}\mathrm{tr}(\alpha\wedge\beta)\vert_{U}:=\sum_{a,b=1}^{\mathrm{dim}(G)}(\alpha^{a}\wedge\beta^{b})\langle e_{a},e_{b}\rangle_{\mathrm{Ad}(P)}\in\Omega^{1}(U),\end{align} where $\{e_{a}\}_{a=1}^{\mathrm{dim}(G)}\subset\Gamma^{\infty}(U,\mathrm{Ad}(P))$ is a local frame and where $\alpha^{a}\in\Omega^{k}(U)$ and $\beta^{b}\in\Omega^{l}(U)$ denote the coordinate forms with respect to this local frame, i.e. $$\alpha\vert_{U}=\sum_{a=1}^{\mathrm{dim}(G)}\alpha^{a}\otimes e_{a}\hspace{1cm}\text{and}\hspace{1cm}\beta\vert_{U}=\sum_{a=1}^{\mathrm{dim}(G)}\beta^{a}\otimes e_{a}.$$ The bracket $\langle\cdot,\cdot\rangle_{\mathrm{Ad}(P)}\in\Gamma^{\infty}(\mathrm{Ad}(P)^{\ast}\otimes\mathrm{Ad}(P)^{\ast})$ denotes the induced vector bundle metric defined by \begin{align}\langle [p,v],[p,w]\rangle_{\mathrm{Ad}(P)}:=\langle v,w\rangle\end{align} for all $[p,v],[p,w]\in\mathrm{Ad}(P)$ and for all $p\in P$. This is clearly well-defined and independent of choices. If $\langle\cdot,\cdot\rangle$ is positive definite and $G$ simple and compact, then $\langle\cdot,\cdot\rangle$ is necessarily a negative multiple of the Killing form of $\mathfrak{g}$, which is, I guess, the reason why one uses the notation "$\mathrm{tr}$" above. Is this right? Does anyone know?