33 #include "../../trace/datapoint.h"
34 #include "../../massspectrum/massspectrum.h"
41 unsigned int parent_charge,
43 std::vector<PeptideIon> ion_list,
46 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
47 PeptideRawFragmentMasses calc_mass_list_proline(*peptide_sp.get(),
50 std::vector<pappso_double> ion_products;
51 unsigned int charge = parent_charge;
56 calc_mass_list_proline.pushBackIonMz(ion_products, ion, charge);
63 unsigned int number_of_matched_peaks = 0;
65 std::sort(ion_products.begin(), ion_products.end());
69 std::vector<pappso_double>::const_iterator it_theoretical =
71 std::vector<pappso_double>::const_iterator it_theoretical_end =
73 std::vector<DataPoint>::const_iterator it_spectrum = spectrum.begin();
74 std::vector<DataPoint>::const_iterator it_spectrum_end = spectrum.end();
78 while((it_spectrum != it_spectrum_end) &&
79 (it_theoretical != it_theoretical_end))
81 sum_intensities += it_spectrum->y;
82 MzRange peak_range(it_spectrum->x, precision);
84 while((it_theoretical != it_theoretical_end) &&
85 (*it_theoretical < peak_range.lower()))
89 while((it_theoretical != it_theoretical_end) &&
90 peak_range.contains(*it_theoretical))
92 sum_matched_intensities += it_spectrum->y;
93 number_of_matched_peaks++;
98 while(it_spectrum != it_spectrum_end)
100 sum_intensities += it_spectrum->y;
110 (sum_matched_intensities / sum_intensities);
112 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;