public double GetStandardArea(SrmSettings settings, int resultsIndex, ChromFileInfoId fileId) { double globalStandardArea = 0; var peptideStandards = settings.GetPeptideStandards(StandardType.SURROGATE_STANDARD); if (peptideStandards == null) { return(0); } foreach (var peptideDocNode in peptideStandards) { if (peptideDocNode.ModifiedTarget.InvariantName != SurrogateName) { continue; } foreach (var nodeGroup in peptideDocNode.TransitionGroups) { if (null != _isotopeLabelType && _isotopeLabelType.Name != nodeGroup.TransitionGroup.LabelType.Name) { continue; } var chromInfos = nodeGroup.GetSafeChromInfo(resultsIndex); if (chromInfos.IsEmpty) { continue; } foreach (var groupChromInfo in chromInfos) { if (ReferenceEquals(fileId, groupChromInfo.FileId) && groupChromInfo.OptimizationStep == 0 && groupChromInfo.Area.HasValue) { globalStandardArea += groupChromInfo.Area.Value; } } } } return(globalStandardArea); }