Invariant mass distribution of D$^0$ candidates with 12 < $p_{\rm T}^{\rm D^0}$ < 18 GeV/$c$ in $R_{\rm T}$ > 1 events