  The formalism of the scattering matrix is applied to describe the
transmission properties of multilayered structures with deep variations of the
refractive index and arbitrary arrangements of the layers. We show that there
is an exact analytical formula for the transmission spectrum, which is valid
for the full spectral range and which contains only a limited number of
parameters for structures satisfying the quarter-wave condition. These
parameters are related to the poles of the scattering matrix, and we present an
efficient algorithm to find them, which is based on considering the ray
propagation inside the structure and subsequent application of the harmonic
inversion technique. These results are significant to analyze the reshaping of
ultrashort pulses in multilayered structures.
