The miniaturization of electronic components drives the development of very sensitive sensors. In particular, NEMS (Nano ElectroMechanical Systems) are now sensitive enough to detect single molecules. This enables to use these sensors in order to design mass spectrometry devices, in an individual molecules counting mode. Our objective is to reconstruct the mass spectrum of the analyzed solution, based on the NEMS output signals. We use inverse problems approach and Bayesian framework. We model the acquisition system linking the unknown parameters to the observable signals with a hierarchical graphical model. We propose a marked-point process model of signal that we compare with discrete-time process one. We develop an impulse deconvolution algorithm which relies on a model exploration scheme. This enables us to detect the molecules, to quantify their mass and to count them in order to estimate the mass spectrum of the analyzed solution. We show results on simulated data and on experimental ones acquired in CEA/INAC using Tantalum nano-aggregates and devices developed in CEA-Leti/DCOS. Compared to state-of-the-art, our method offers high counting rate and keeps a low false detection rate. It also permits the computation of uncertainties on estimated values. Finally, we propose a derivation of the method to deal with the reconstruction of discrete mass spectra.