Analysis framework for the Heavy Photon Search experiment