The role of lattice vibrations in dynamical theory of X‐rays