Can the class of the canonical bundle be recovered from the total space of the cotangent bundle if one forgets that it is a cotangent bundle?

This is a somewhat speculative question, so bear with that (or not, as is your preference).

Let $X$ be a smooth projective variety, and let $\omega_X$ be its canonical sheaf. The Euler class of this line bundle $e(\omega_X)\in H^2(X;\mathbb Z)$ (which for simplicity we'll assume is torsion-free) defines a distinguished cohomology class.

Now, $T^*X$ is homotopy equivalent to $X$, so this also a well-defined class in $H^2(T^*X;\mathbb Z)$.

Is there some canonical way of getting this class which only uses the geometry of $T^*X$?

Of course, "only using the geometry of $T^*X$" is not really a well-defined notion (so I apologize if I disagree with any of the answerers about what this means). I mostly mean

Is there some way of describing this class which can be applied to other symplectic varieties (possibly with an extra structure, like a dilating $\mathbb{C}^*$-action).

EDIT: An example of something I would prefer not to use is that $T^*X$ has the homotopy type of a smooth compact manifold (as I'm interested in examples where this is not the case). Sorry, Torsten.

For an extra twist, I'm most interested in the class of $\frac 12e(\omega_X)\in H^2(X;\mathbb Q)/H^2(X;\mathbb Z)$, which one can think of as a class in $H^2(X;\mathbb Z/2\mathbb Z)$. Could this have something to do with spin structures and characteristic classes?

-

The reduction mod $2$ of $e(X)$ is the second Stiefel-Whitney class of $X$ which by Wu's formula can be recovered from the homotopy type of $X$ (Steenrod operations and the Poincaré duality for the mod $2$ cohomology algebra of $X$). This can be read off from the mod $2$ cohomology of $T^\ast(X)$. Note that this reconstructs the class purely formally from the Steenrod action on and the multiplication of the mod $2$ cohomology of $T^\ast(X)$ and in no way involves the manifold structure of $T^\ast(X)$. The point is rather that its cohomology behaves as the cohomology of a compact manifold of dimension $2\dim X$.