Added funtion to find the particle mass and calculate the optimal force resolution of a simulated dark matter halo