updated system.hpp, montecarlo.hpp

check, if particles are in the box or not.