  Silicon drift detectors (SDDs) revolutionized spectroscopy in fields as
diverse as geology and dentistry. For a subset of experiments at ultra-fast,
x-ray free-electron lasers (FELs), SDDs can make substantial contributions.
Often the unknown spectrum is interesting, carrying science data, or the
background measurement is useful to identify unexpected signals. Many
measurements involve only several discrete photon energies known a priori,
allowing single event decomposition of pile-up and spectroscopic photon
counting. We designed a pulse function and demonstrated that the signal
amplitude and rise time are obtained for each pulse by fitting, thus removing
the need for pulse shaping. By avoiding pulse shaping, rise times of tens of
nanoseconds resulted in reduced pulse pile-up and allowed decomposition of
remaining pulse pile-up at photon separation times down to hundreds of
nanoseconds while yielding time-of-arrival information with precision of 10
nanoseconds. Waveform fitting yields simultaneously high energy resolution and
high counting rates (2 orders of magnitude higher than current digital pulse
processors). We showed that pile-up spectrum fitting is relatively simple and
preferable to pile-up spectrum deconvolution. We developed a photon pile-up
statistical model for constant intensity sources, extended it to variable
intensity sources (typical for FELs) and used it to fit a complex pile-up
spectrum. We subsequently developed a Bayesian pile-up decomposition method
that allows decomposing pile-up of single events with up to 6 photons from 6
monochromatic lines with 99% accuracy. The usefulness of SDDs will continue
into the x-ray FEL era of science. Their successors, the ePixS hybrid pixel
detectors, already offer hundreds of pixels, each with similar performance to
an SDD, in a compact, robust and affordable package
