Simultaneous determination of layer thickness, composition, and mass absorption by X-ray diffraction