Hard pion and prompt photon at RHIC, from single to double inclusive production