The Plasma and Supra-Thermal Ion Composition (PLASTIC) instrument is one of four experiment packages on board of the two identical STEREO spacecraft A and B, which were successfully launched from Cape Canaveral on 26 October 2006. During the two years of the nominal STEREO mission, PLASTIC is providing us with the plasma characteristics of protons, alpha particles, and heavy ions. PLASTIC will also provide key diagnostic measurements in the form of the mass and charge state composition of heavy ions. Three measurements (E/qk, time of flight, ESSD) from the pulse height raw data are used to characterize the solar wind ions from the solar wind sector, and part of the suprathermal particles from the wide-angle partition with respect to mass, atomic number and charge state. In this paper, we present a new method for flight data analysis based on simulations of the PLASTIC response to solar wind ions. We present the response of the entrance system / energy analyzer in an analytical form. Based on stopping power theory, we use an analytical expression for the energy loss of the ions when they pass through a thin carbon foil. This allows us to model analytically the response of the time of flight mass spectrometer to solar wind ions. Thus we present a new version of the analytical response of the solid state detectors to solar wind ions. Various important parameters needed for our models were derived, based on calibration data and on the first flight measurements obtained from STEREO-A. We used information from each measured event that is registered in full resolution in the Pulse Height Analysis words and we derived a new algorithm for the analysis of both existing and future data sets of a similar nature which was tested and works well. This algorithm allows us to obtain, for each measured event, the mass, atomic number and charge state in the correct physical units. Finally, an important criterion was developed for filtering our Fe raw flight data set from the pulse height data without discriminating charge states.