Transverse momentum spectrum of mesons produced in high energy nucleus-nucleus collisions