If a member dies on or after the effective date of retirement and prior to the mailing of a retirement allowance warrant and if the member has elected an optional settlement 2 or 3 or an optional settlement 4 involving payment of an allowance throughout the life of the beneficiary, or the member elected the unmodified allowance or optional settlement 1 and if a partially continued retirement allowance under Sections 21624 through 21631, is payable, the death shall be considered to be death after retirement and the applicable benefits shall be payable.
However, if the beneficiary designated on the election for retirement is either (1) the surviving unmarried minor child or children of the member and there is no surviving spouse eligible for a partially continued retirement allowance under Sections 21624 through 21631, or (2) the surviving spouse of the member, the surviving spouse so named or the legal representative of the minor child or children so named may elect to receive benefits that would have been payable had the death occurred under the conditions of Section 21530. Except as provided in Section 21503, nothing in this part permits a surviving spouse, surviving children, or any person other than a member to elect an optional settlement.