Determination of the threshold of the break-up of invariant tori in a class of three frequency Hamiltonian systems