Bordism invariants as integrals of Stiefel-Whitney classes I am trying to understand this mathematical physics paper by A. Kapustin, which assumes knowledge of bordism invariants of smooth compact manifolds:
https://arxiv.org/abs/1403.1467v3
For example, some non-trivial unoriented bordism groups are
$$ \Omega^O_2 = \mathbb{Z}_2,\qquad\Omega^O_4 = \mathbb{Z}_2\oplus \mathbb{Z}_2\quad\textrm{and}\quad \Omega^O_5 = \mathbb{Z}_2$$
In the paper, Kapustin does not write explicit formulas for these invariants. However, he formulates the actions of the corresponding physical systems studied (pages 10-11). From those formulas, I expect the corresponding bordism invariants to be computed as integrals of cup products of Stiefel-Whitney classes. 
Explicitly for the three groups above 
$$n_2 = \int w_1^2 $$
$$n_4^{(1)} = \int w_1^4\quad\textrm{and}\quad n_4^{(2)} = \int w_2^2$$
$$n_5 =\int w_2 w_3$$
where all the products/powers are cup product, i.e. $w_2^2 = w_2 \smile w_2$ etc., and the Stiefel-Whitney class $w_q \in H^q(M,\mathbb{Z}_2)$ is a q-cocycle that "somehow" describes the topology of the manifold via its tangent bundle.
Given a triangulation of a manifold, together with a q-cocycle on each q-skeleton, it is clear to me how to compute the cup products and the integrals.
However, what is very unclear to me is how a triangulated manifold is equipped with the q-cocycles that characterize the tangent bundle in the first place. I understand that there should be some canonical choice (perhaps up to coboundary), but how does one explicitly construct this?
For example, let's say that I take $\mathbb{R}P^4$ or $\mathbb{C}P^2$ (which should correspond to different non-trivial elements of $\Omega_4^O$) - or perhaps some more trivial but lower-dimensional examples - with some triangulations. Then how can I define the corresponding 1-cocycles and 2-cocycles (i.e. a $\mathbb{Z}_2$ numbers of each 1-simplex resp. 2-simplex, which are subject to the cocycle condition) that characterize the tangent bundle? 
 A: Quoting (from memory) Milnor and Stasheff, Characteristic Classes, 
"A curious fact is that for a triangulated manifold $M$, the Poincare dual of the total Stiefel-Whitney class is given by the sum of all simplices in the first barycentric subdivision of a triangulation." 
In particular, if you have, say, a unit 2-sphere represented as a tetrahedron, then you can subdivide each face into 6 triangles using barycentric subdivision, and take the union of all the edges in this subdivision, and you get a cycle, $u_1$, whose homology class is Poincare dual to $w_1$. 
Slightly more interesting is to do the same with an octahedron, because it's symmetric under the antipodal map. Summing up all edges in the first barycentric subdivision gives $u_1$, again dual to $w_1$. But if you take only those edges in the upper hemisphere, then their image, under the quotient by the antipodal map, gives a cycle in $RP^2$ whose homology class is the unique nonzero element of $H_1$, and whose dual is $w_1$, the generator of the cohomology ring of $RP^2$. 
I think that M&S credit this result to Cheeger. And I'm sure I've gotten the quotation slightly wrong, but the gist is mostly correct. I'm thinking that the quotation appears somewhere in chapters 9-12, but that's just a shot in the dark. Perhaps it's in the section on obstruction theory. 
