|  | OpenMS
    2.6.0
    | 
 
 
  
  
 
Go to the documentation of this file.
   79     template <
typename SpectrumType>
 
   82       if (spectrum.size() < 2)
 
   86       double tolerance = (
double)param_.getValue(
"tolerance");
 
   87       double parentmass = 0.0;
 
   94       Size j = spectrum.size() - 1;
 
   95       for (
Size i = 0; i < spectrum.size() && i <= j; )
 
   97         double sum = spectrum[i].getPosition()[0] + spectrum[j].getPosition()[0];
 
   99         if (std::fabs(
sum - parentmass) < tolerance)
 
  101           result += spectrum[i].getIntensity() + spectrum[j].getIntensity();
 
  104         if (
sum < parentmass)
 
  110           if (
sum > parentmass)
 
  123       return "ComplementFilter";
 
  
static double sum(IteratorType begin, IteratorType end)
Calculates the sum of a range of values.
Definition: StatisticFunctions.h:120
static FilterFunctor * create()
Definition: ComplementFilter.h:76
total intensity of peak pairs that could result from complementing fragments of charge state 1
Definition: ComplementFilter.h:51
A more convenient string class.
Definition: String.h:59
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
double apply(SpectrumType &spectrum)
returns the total intensity of peak pairs which could result from complementing fragments
Definition: ComplementFilter.h:80
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
A FilterFunctor extracts some spectrum characteristics for quality assessment.
Definition: FilterFunctor.h:44
static const String getProductName()
returns the name for registration at the factory
Definition: ComplementFilter.h:121
void sortByPosition()
Lexicographically sorts the peaks by their position.
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67