Mechanism on the efficient formation of singlet oxygen by energy transfer from excited singlet and triplet states of aromatic hydrocarbons