Text this: Analytical model for pulse pileup spectra and count statistics in photon counting detectors with seminonparalyzable behavior.