The study of X-Ray fluorescence (XRF) emission spectra is a powerful technique used in applications that range from biology to cultural heritage. Key objectives of this technique include identification and quantification of elemental traces composing the analyzed sample. However, precise derivation of elemental concentration is often hampered by self-absorption of the XRF signal emitted by light constituents. This attenuation depends on the amount of sample present between the radiation source and detection system and allows for the exploitation of self-absorption in order to recover a sample topography. In this work, an x-ray-tracing application based on the use of multiple silicon drift detectors, is introduced to inversely reconstruct a 3D sample with correct topographical landscape, from 2D XRF count rates maps obtained from spectroscopy. The reconstruction was tested on the XRF maps of a simulated sample, which is composed of three cells with different size but similar composition. We propose to use the recovered 3D sample topography in order to numerically compute the self-absorption effects on the X-ray fluorescence radiation, thereby showing that a quantitative correction is possible. Lastly, we present a web application which implements the suggested methodology, in order to demonstrate its feasibility and applicability, available at: https://github.com/ElettraSciComp/xrfstir.