  We show that in a central nucleus-nucleus collision, the variation of the
mean transverse mass with the multiplicity is determined, up to a rescaling, by
the variation of the energy over entropy ratio as a function of the entropy
density, thus providing a direct link between experimental data and the
equation of state. Each colliding energy thus probes the equation of state at
an effective entropy density, whose approximate value is $19$ fm$^{-3}$ for
Au+Au collisions at 200 GeV and $41$ fm$^{-3}$ for Pb+Pb collisions at 2.76
TeV, corresponding to temperatures of $227$ MeV and $279$ MeV if the equation
of state is taken from lattice calculations. The relative change of the mean
transverse mass as a function of the colliding energy gives a direct measure of
the pressure over energy density ratio $P/\epsilon$, at the corresponding
effective density. Using RHIC and LHC data, we obtain $P/\epsilon=0.21\pm
0.10$, in agreement with the lattice value $P/\epsilon=0.23$ in the
corresponding temperature range. Measurements over a wide range of colliding
energies using a single detector with good particle identification would help
reducing the error.
