process of formation of ore minerals