The Hamiltonian is a function on the cotangent bundle to a configuration manifold $H:T^*M\rightarrow \mathbb R$. The Lagrangian is a function on the tangent bundle to the configuration manifold $\mathscr L:TM\rightarrow \mathbb R$. What is the Routhian function $R$ defined on?
My guess is $TM\bigoplus T^*M$?