initialize masses massTotal from tensor with current sum