  The depth dependence of the crystallographic parameters mosaicity, lattice
parameter variation and integrated reflectivity and of the critical scattering
above the 105 K structural phase transition of SrTiO$_3$ have been studied in
five different single crystals by means of high resolution triple-crystal
diffractometry using 100-120 keV synchrotron radiation. Depth-dependent
impedance measurements indicate that the presence of oxygen vacancies is not
responsible for the two-length scale phenomenon. It is found that the sharp
component occurs only in surface near regions of highly perfect single crystals
and is coupled to an exponential inrease of the crystallographic quantities.
The second length scale is absent at a surface where the strain fields are able
to relax by a macroscopic bending of the lattice planes. The sharp component is
also strongly suppressed in crystals of relatively large mosaicity. The
combination of long range strain fields in highly perfect samples and the
vicinity of the surface seem to be necessary conditions for the observation of
the sharp component. The critical exponents for the second length scale are in
satisfying agreement with scaling laws if the intensity of the critical
scattering is assumed to be proportional to the square of the Lorentzian
susceptibility and not, as usual in the current convention, to a
Lorentzian-squared susceptibility. The critical exponents of the broad
component are independent of the appearance of the sharp component.
