Cooperative and chaotic transition of a free electron laser Hamiltonian model