Fast algorithm for the reconciliation of gene trees and LGT networks