/// <summary> /// Builds and assigns the spectral trees for each detected chromatogram peak /// </summary> /// <remarks> /// For each detected peak, spectral trees are generated from the MS1 scans including all matching data dependent scans eluting in that retention time range. /// Matching means that the precursor mass of the MS2 scan must match the mass used to create the chromatogram trace within the given mass tolerance. Finally all /// spectral tree with matching data dependent scans are assigned to the detected peak. /// </remarks> private void BuildSpectralTrees(IEnumerable <SpectrumDescriptor> spectrumDescriptors, IEnumerable <DetectedPeakDetails> peakDetails) { SendAndLogTemporaryMessage("Building spectral trees..."); var timer = Stopwatch.StartNew(); DetectedPeakDetailsHelper.AssignSpectrumTreesToPeakDetails(spectrumDescriptors.OfType <ISpectrumDescriptor>(), peakDetails); timer.Stop(); SendAndLogMessage("Building spectral trees takes {0:F2} s.", timer.Elapsed.TotalSeconds); }