  CONTEXT: The second Gaia data release (DR2) took place on April 2018. DR2
included photometry for more than 1.3 10^9 sources in G, BP, and RP. Even
though Gaia DR2 photometry is very precise, there are currently three
alternative definitions of the sensitivity curves that show significative
differences. AIMS: The aim of this paper is to improve the quality of the input
calibration data to produce new compatible definitions of the three bands and
to identify the reasons for the discrepancies between previous definitions.
METHODS: We have searched the HST archive for STIS spectra with G430L+G750L
data obtained with wide apertures and combined them with the CALSPEC library to
produce a high quality SED library of 122 stars with a broad range of colors,
including three very red stars. We have used it to compute new sensitivity
curves for G, BP, and RP using a functional analytical formalism. RESULTS: The
new curves are significantly better than the two previous attempts, REV and
WEI. For G we confirm the existence of a systematic bias in magnitude and
correct a color term present in REV. For BP we confirm the need to define two
magnitude ranges with different sensitivity curves and measure the cut between
them at G = 10.87 with a significant increase in precision. The new curves also
fit the data better than either REV or WEI. For RP we obtain a sensitivity
curve that better fits the STIS spectra and we find that the differences with
previous attempts reside in a systematic effect between ground-based and HST
spectral libraries. Additional evidence from color-color diagrams indicate that
the new sensitivity curve is more accurate. Nevertheless, there is still room
for improvement in the accuracy of the sensitivity curves because of the
current dearth of good-quality red calibrators: adding more to the sample
should be a priority before Gaia data release 3 takes place.
