Functional forms for photon spectra of clinical linacs