An effective centroid Hamiltonian and its associated centroid dynamics for indistinguishable particles in a harmonic trap