Study of magnetization reversal in layered heterostructures by vector magnetometry