Gravar-mail: Signal to noise ratio of energy selective x-ray photon counting systems with pileup