Electron coherence and magnetic structure in a nanostructured ferromagnetic ring