Most problems concerning two-body motion (using Lagrangian methods) often only consider the motion of two particles subject to no external forces. However, the Lagrangian should be decomposable into the center of mass (CM) and relative parts even if our closed system (momentum of the CM is constant) of two interacting masses is producing an attractive gravitational field.
The Lagrangian that describes the two-body system with no attractive gravitational field is
$${\cal L}=\frac{1}{2}M\dot{\vec{R}}^2 +\left(\frac{1}{2}\mu\dot{\vec{r}}^2-U(r)\right)={\cal L}_{\rm CM}+{\cal L}_{\rm rel}$$
If we then considered an attractive gravitational field, how would this change the above Lagrangian?
My thought process is that the CM term will not change, since the gravitational field is attractive w.r.t the two masses, thereby implying that only the terms containing r will be affected by the field.
The gravitational field between masses 1 and 2 is simply described as conservative and central: $\vec{g}$.
How would I rewrite the Lagrangian with this g-field now in play?