  (Abridged) X1822-371 is the prototypical accretion disc corona X-ray source,
a low-mass X-ray binary viewed at very high inclination, thereby allowing the
disc structure and extended disc coronal regions to be visible. We study the
structure of the accretion disc in X1822-371 by modelling the phase-resolved
spectra both in optical and X-ray regime. We analyse high time resolution
optical ESO/VLT spectra of X1822-371 to study the variability in the emission
line profiles. In addition, we use data from XMM-Newton space observatory to
study phase-resolved as well as high resolution X-ray spectra. We apply the
Doppler tomography technique to reconstruct a map of the optical emission
distribution in the system. We fit multi-component models to the X-ray spectra.
We find that our results from both the optical and X-ray analysis can be
explained with a model where the accretion disc has a thick rim in the region
where the accretion stream impacts the disc. The behaviour of the H_beta line
complex implies that some of the accreting matter creates an outburst around
the accretion stream impact location and that the resulting outflow of matter
moves both away from the accretion disc and towards the centre of the disc.
Such behaviour can be explained by an almost isotropic outflow of matter from
the accretion stream impact region. The optical emission lines of HeII 4686 and
5411 show double peaked profiles, typical for an accretion disc at high
inclination. However, their velocities are slower than expected for an
accretion disc in a system like X1822-371. This, combined with the fact that
the HeII emission lines do not get eclipsed during the partial eclipse in the
continuum, suggests that the line emission does not originate in the orbital
plane and is more likely to come from above the accretion disc, for example the
accretion disc wind.
