Fast and efficient particle reconstruction on a 3D grid using sparsity