Irreducible representation decomposition of tensor on manifold with metric I'm aware that for some tensor product space, Schur-Weyl duality lets me decompose the space into irreducible representations by looking at irreps of the symmetric group. The simplest example is $V\otimes V\cong \mathrm{Sym}^2(V)\oplus \Lambda^2(V)$. In physicists' notation (warning, I am a physicist), we would write $T_{ab} = T_{(ab)} + T_{[ab]}$.
However, when talking about tensors on a manifold $M$ with metric $g$, we can also take traces and so further reduce symmetric products into a trace and trace-free part, i.e. $T_{ab} = \frac{1}{d}g_{ab}T + [T_{ab}]^{\tiny{STF}} + T_{[ab]}$ where $T\equiv g^{ab}T_{ab}$, $d$ is the dimension of the manifold, and $[T_{ab}]^{\tiny{STF}} = T_{(ab)}-\frac{1}{d}g_{ab}T$. This seems to be relevant because because $g$ is an invariant symbol of $SO(p,q)$ where $(p,q)$ is the signature of $g$. There will also be an alternating tensor of highest rank which will be an invariant symbol, and this could also appear in the decomposition.
Schur-Weyl doesn't seem to say anything about metrics, trace/trace-free decompositions, etc. What is the general decomposition here? Is there an algorithm to follow?
 A: Have a look at the beginning of section 33 (in particular, 33.2) of 
the book "Natural operations in differential geometry" (pdf), for the Riemannian case only. It should work for the $SO(p,q)$ case also. There all $O(n)$-invariant tensors are described:
The idea is to tensor with the metric or its inverse and then use the $GL(n)$ decomposition, i.e., involve traces and permutations.
Edit: Link corrected.
A: There is a "Schur-Weyl theory" for representation of $O(n)$ and $Sp(n)$. The group algebra of the symmetric group is replaced by the Brauer algebra. Basically, you first decompose your tensor product with respect to "the number of traces the vectors contain" and then for each such part you can use the classical $GL$ decomposition. 
The relevant representation theory over complex numbers is treated in a book by Wallach and Goodman Symmetry, Representations, and Invariants. In particular look at the appendix F on the linked web page. Alternatively, you can look into the older version of this book which was published under the name Representations and Invariants of the Classical Groups. 
You should be careful when dealing with representation of noncompact real groups. 
