private List<ProductIon> addProductIonListByCharge(PrecursorIon precursorIon, int charge) {
        List<ProductIon> ionList = new ArrayList<ProductIon>();

        switch (ionPair) {
            case B_Y:
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.B, charge));
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Y, charge));
                if (showWaterLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.B_H2O, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Y_H2O, charge));
                }
                if (showAmmoniaLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.B_NH3, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Y_NH3, charge));
                }
                break;
            case A_X:
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.A, charge));
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.X, charge));
                if (showWaterLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.A_H2O, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.X_H2O, charge));
                }
                if (showAmmoniaLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.A_NH3, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.X_NH3, charge));
                }
                break;
            case C_Z:
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.C, charge));
                ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Z, charge));
                if (showWaterLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.C_H2O, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Z_H2O, charge));
                }
                if (showAmmoniaLoss) {
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.C_NH3, charge));
                    ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.Z_NH3, charge));
                }
                break;
        }

        return ionList;
    }