A magnetic sensor is disclosed comprising an antiferromagnetic layer; a
first ferromagnetic layer disposed over the antiferromagnetic layer, the
first ferromagnetic layer having a magnetization that is pinned by the
antiferromagnetic layer; a second ferromagnetic layer disposed over the
first ferromagnetic layer, the second ferromagnetic layer having a
magnetization that rotates due to an applied magnetic field; a third
ferromagnetic layer disposed adjacent to an end of the second
ferromagnetic layer, the third ferromagnetic layer having a primarily
in-plane magnetization providing a magnetic field to stabilize the end of
the second ferromagnetic layer; an amorphous, metallic, nonmagnetic
underlayer disposed adjacent to the antiferromagnetic layer; and a
crystalline seed layer disposed between the underlayer and the third
ferromagnetic layer, the seed layer having a crystalline structure that
promotes the in-plane magnetization of the third ferromagnetic layer.