Nanostructuring YBCO thin films by heavy-ion beam for local magnetic field and infrared photon detection