53                                     unsigned int parent_charge,
 
   55                                     std::list<Enums::PeptideIon> ion_list,
 
   56                                     bool refine_spectrum_synthesis)
 
   68      unsigned int max_charge = parent_charge;
 
   71          max_charge = parent_charge - 1;
 
   74        spectrum, peptideSp, max_charge, precision, ion_list);
 
   86      std::map<Enums::PeptideIon, unsigned int> ion_count;
 
   87      for(
auto &&ion_type : ion_list)
 
   89          ion_count.insert(std::pair<Enums::PeptideIon, unsigned int>(ion_type, 0));
 
   92      std::map<unsigned int, pappso_double> charge_dot_product;
 
   93      std::map<unsigned int, std::map<Enums::PeptideIon, unsigned int>>
 
   95      for(
unsigned int i = 1; i <= max_charge; i++)
 
   97          charge_dot_product.insert(
 
   98            std::pair<unsigned int, pappso_double>(i, 0));
 
   99          charge_ion_count.insert(
 
  100            std::pair<
unsigned int, std::map<Enums::PeptideIon, unsigned int>>(
 
  103      QString sequence = peptideSp.get()->getSequence();
 
  104      for(
auto &&peptide_ion_match : psm)
 
  107          unsigned int charge = peptide_ion_match.getCharge();
 
  108          charge_dot_product[charge] +=
 
  109            peptide_ion_match.getPeak().y *
 
  112              peptide_ion_match.getPeptideIonDirection(),
 
  113              peptide_ion_match.getPeptideFragmentIonSp().get()->size());
 
  114          charge_ion_count[charge][ion_type] += 1;
 
  118      qDebug() << __FILE__ << 
" " << __FUNCTION__ << 
" " << __LINE__
 
  122      for(
unsigned int i = 1; i <= max_charge; i++)
 
  124          sum_intensity += charge_dot_product[i];
 
  128          sum_intensity *= 
factorial(count.second);
 
  136        QObject::tr(
"ERROR computing hyperscore, PAPPSO exception:\n%1")
 
  137          .arg(exception_pappso.
qwhat());
 
  138      qDebug() << 
"XtandemHyperscore::XtandemHyperscore PappsoException :\n" 
  142  catch(std::exception &exception_std)
 
  145        QObject::tr(
"ERROR computing hyperscore, std exception:\n%1")
 
  146          .arg(exception_std.what());
 
  147      qDebug() << 
"XtandemHyperscore::XtandemHyperscore std::exception :\n" 
 
XtandemHyperscore(const MassSpectrum &spectrum, pappso::PeptideSp peptideSp, unsigned int parent_charge, PrecisionPtr precision, std::list< Enums::PeptideIon > ion_list, bool refine_spectrum_synthesis)