Multiwavelength Photometry in the Globular Cluster M2