Real part of the optical potential for composite particles