# How to compute the canonical bundle of a generalized flag bundle?

If $$X:=Gr_k(V)$$ denotes the Grassmannian of $$k$$-dimensional subspaces of an $$n$$-dimensional vector space $$V$$, it is well-known that the canonical bundle $$\omega_X$$ is given by $$\omega_X:= \det \Omega_X^1= \det E \otimes Q^* = \mathcal{O}(-n),$$ where $$\Omega_X^1$$ denotes the cotangent bundle of $$X$$, $$E$$ is the tautological subbundle of rank $$k$$ of the Grassmannian and $$Q$$ is the corresponding quotient subbundle.

This may be generalized to Grassmann bundles (e.g. https://arxiv.org/pdf/0807.3296.pdf, prop. 1.5): If $$V$$ is a vector bundle over some scheme $$Y$$ and $$X=Gr_Y(k,V)$$ parametrizes rank-$$k$$-subbundles of $$V$$, then similarly $$\omega_X=\det E \otimes Q^* = (\det V)^{-k} \otimes \mathcal{O}(-n).$$

Now I would like to consider Grassmannians (or, more generally, flag bundles) of other Lie types, especially in type $$D$$. There are notions of orthogonal flag bundles (and orthogonal Grassmann bundles), but I cannot find any references for the canonical bundle. For an $$2n$$-dimensional vector space $$V$$ equipped with a quadratic form, if $$X=OG(n,V)$$ parametrizes maximal isotropic subspaces of $$V$$, I know that the canonical divisor is given by $$\omega_X = \mathcal{O}(-2n+2)$$ (still I did not find any good reference).

My questions are:

1. Is there a nice way to see $$\omega_X=\mathcal{O}(-2n+2)$$?
2. How do I generalize to bundles? There should be involved some more terms coming from the base scheme, but I do not have a good intuition for this.

I figured out the following: The tangent bundle of the orthogonal Grasmann bundle over a variety $$X$$ is given by $$T \mathrm{OG}_X(n,V) = \wedge^2 E^* \otimes \pi^* \mathcal{L}$$ where $$E$$ denotes the pullback of the tautological bundle over $$\mathrm{Gr}(n,2n)$$ and $$\mathcal{L}$$ is the line bundle in which the symmetric bilinear form has its values. Taking the determinant of the dual of it we get $$\omega_{\mathrm{OG}_X(n, V)} = (E^*)^{n-1} \otimes \pi^*\mathcal{L}^{\frac{n(n-1)}{2}} = \mathcal{O}(-2n+2) \otimes \pi^*\mathcal{L}^{\frac{n(n-1)}{2}}.$$ Did I make a mistake?