code: public boolean isInSubset(IScan scan) {
      int num = scan.getNum();
      if (scanNumLo != null) {
        if (num < scanNumLo) {
          return false;
        }
      }
      if (scanNumHi != null) {
        if (num > scanNumHi) {
          return false;
        }
      }
      Integer msLevel = scan.getMsLevel();
      if (msLvls != null) {
        if (!msLvls.contains(msLevel)) {
          return false;
        }
      }
      DoubleRange range;
      if (mzRanges != null) {
        if (msLevel == 1) {
          if (scan.getScanMzWindowLower() == null || scan.getScanMzWindowUpper() == null) {
            throw new IllegalStateException(String.format(
                "Could not check if scan #%d (MS%d) is in LCMSDataSubset, as lower/upper m/z range was not present in the scan.",
                num, msLevel));
          }
          range = new DoubleRange(scan.getScanMzWindowLower(), scan.getScanMzWindowUpper());
  
        } else {
          if (scan.getPrecursor() == null) {
            throw new IllegalStateException(String.format(
                "Could not check if scan #%d (MS%d) is in LCMSDataSubset, as precursor info was not present in the scan.",
                num, msLevel));
          }
          range = new DoubleRange(scan.getPrecursor().getMzRangeStart(),
              scan.getPrecursor().getMzRangeEnd());
        }
        for (DoubleRange listedRange : mzRanges) {
          if (range.overlapRelative(listedRange) < IScanCollection.MIN_GROUP_OVERLAP) {
            return false;
          }
        }
      }
      return true;
    }
docs: In some cases we don't have the lower/upper mz window (for MS1 this requires either this data
  to be in scan meta info, or the spectrumRef to be parsed). In this case the method returns
  TRUE.