For a Calabi-Yau 4-fold $(X,\omega)$, where $X$ is quasi-projective and $\omega$ is a nowhere vanishing section of its canonical bundle $K_X$, the (derived) moduli stack of compactly supported perfect complexes $\mathcal{ M}_X$ is $-2$-shifted symplectic and thus has an orientation bundle $O^\omega\to \mathcal{ M}_X$ in the sense of Borisov-Joyce arXiv:1504.00690 necessary for defining Donaldson-Thomas type invariants of $X$. We extend first the orientability result of Cao-Gross-Joyce arXiv:1811.09658 to projective spin 4-folds. Then for any smooth projective compactification $\bar{ X}$, such that $D=\bar{ X}\backslash X$ is strictly normal crossing, we define orientation bundles on the stack $\mathcal{ M}_{ \bar{ X}}\times_{ \mathcal{ M}_D}\mathcal{ M}_{ \bar{ X}}$ and express these as pullbacks of $\mathbb{ Z}_2$-bundles in gauge theory constructed using positive Dirac operators on the double of $X$. As a result, we relate the orientation bundle $O^\omega\to \mathcal{ M}_X$ to a gauge-theoretic orientation on the classifying space of compactly supported K-theory. Using orientability of the latter, we obtain orientability of $\mathcal{ M}_X$. We also prove orientability of moduli spaces of stable pairs and Hilbert schemes of proper subschemes. Finally, we consider the compatibility of orientations under direct sums.
Categories: math.AG math.DG