added masses.py for particle mass distribution calculations