Dimensional reduction of integrals of orthogonal invariants