Analysis and correction of the magnetic field effects in the Hybrid Photo-Detectors of the RICH2 detector of LHCb