  [Abridged] In high density environment, the gas content of galaxies is
stripped, leading to a rapid quenching of their star formation activity. This
dramatic environmental effect is generally not taken into account in the SFHs
usually assumed to perform spectral energy distribution (SED) fitting of these
galaxies, yielding to a poor fit of their stellar emission and, consequently, a
biased estimate of the SFR. We aim at reproducing the SFH of galaxies that
underwent a rapid star formation quenching using a truncated delayed SFH that
we implemented in the SED fitting code CIGALE. We show that the ratio between
the instantaneous SFR and the SFR just before the quenching ($r_{SFR}$) is well
constrained as long as rest frame UV data are available. This SED modelling is
applied to the Herschel Reference Survey (HRS) containing isolated galaxies and
sources falling in the dense environment of the Virgo cluster. The latter are
HI-deficient due to ram pressure stripping. We show that the truncated delayed
SFH successfully reproduces their SED while typical SFH assumptions fail. A
good correlation is found between $r_{SFR}$ and HI-def, the parameter
quantifying the gas deficiency of cluster galaxies, meaning that SED fitting
results can be used to provide a tentative estimate of the gas deficiency of
galaxies for which HI observations are not available. The HRS galaxies are
placed on the SFR-$M_*$ diagram showing that the HI-deficient sources lie in
the quiescent region confirming previous studies. Using the $r_{SFR}$
parameter, we derive the SFR of these sources before quenching and show that
they were previously on the main sequence relation. We show that the $r_{SFR}$
parameter is also well recovered for deeply obscured high redshift sources, as
well as in absence of IR data. SED fitting is thus a powerful tool to identify
galaxies that underwent a rapid star formation quenching.
