  Deuterium fractionation provides a window to the thermal history of volatiles
in the solar system and protoplanetary disks. While evidence of active
molecular deuteration has been observed towards a handful of disks, it remains
unclear whether this chemistry affects the composition of forming planetesimals
due to limited observational constraints on the radial and vertical
distribution of deuterated molecules. To shed light on this question, we
introduce new ALMA observations of DCO$^+$ and DCN $J=2-1$ at an angular
resolution of $0.5"$ (30 au) and combine them with archival data of higher
energy transitions towards the protoplanetary disk around TW Hya. We carry out
a radial excitation analysis assuming both LTE and non-LTE to localize the
physical conditions traced by DCO$^+$ and DCN emission in the disk, thus
assessing deuterium fractionation efficiencies and pathways at different disk
locations. We find similar disk-averaged column densities of $1.9\times10^{12}$
and $9.8\times10^{11}$ cm$^{-2}$ for DCO$^{+}$ and DCN, with typical kinetic
temperatures for both molecules of 20-30K, indicating a common origin near the
comet- and planet-forming midplane. The observed DCO$^+$/DCN abundance ratio,
combined with recent modeling results, provide tentative evidence of a gas
phase C/O enhancement within $<40$ au. Observations of DCO$^+$ and DCN in other
disks, as well as HCN and HCO$^+$, will be necessary to place the trends
exhibited by TW Hya in context, and fully constrain the main deuteration
mechanisms in disks.
