Elastic and inelastic scattering of high-energy electrons and X-rays by NH3, CH4 and H2O molecules