Analysis of the loss of coherence in interferometry with macromolecules (18 pages)