62 msp_filterExclusion.get()->filter(trace_a);
63 msp_filterExclusion.get()->filter(trace_b);
65 auto itb = trace_b.begin();
66 double inner_intensity_product = 0;
67 for(
const auto &peak_a : trace_a)
69 MzRange range(peak_a.x, mp_precision);
70 double low = range.
lower();
71 double up = range.
upper();
73 while((itb != trace_b.end()) && (itb->x < low))
79 inner_intensity_product += peak_a.y * itb->y;
83 double tracea_product = 0;
85 for(
const auto &peak_a : trace_a)
87 tracea_product += peak_a.y * peak_a.y;
91 double traceb_product = 0;
93 for(
const auto &peak_a : trace_b)
95 traceb_product += peak_a.y * peak_a.y;
98 return (inner_intensity_product / (sqrt(tracea_product) * sqrt(traceb_product)));