In recent years, the ability to grow single crystal layers of both doped and pure diamonds has improved, and devices for applications in high power electronics and microelectronics are being developed, most of them based on boron doped diamond. In this work, convoluted angular and energy spectra (so-called secondary ion mass spectrometry energy spectra) have been measured for 11B+, 12C+, 16O+, CO+ and CO2+ ions ejected from a single crystal boron doped diamond layer under ultralow energy oxygen and electron beam bombardment. A low energy tail was observed in the 12C+, CO+, and CO2+ signals, corresponding to ions produced in the gas phase. Changing the bombardment conditions, we have identified interaction with the electron beam as the main ionization mechanism. In the case of 12C+ it appears that the gas phase ions are produced by electron stimulated desorption and postionization of surface species created by the oxygen beam. We have detected high signals for CO+ and CO2+ ionized in the gas phase, which supports a mechanism previously suggested to explain the anomalously fast diamond erosion under oxygen ion beam bombardment. We also observe that some species appearing in the mass spectrum are produced by electron stimulated desorption and this needs to- be remembered when analyzing these on insulating diamond with charge compensation.