Analysis of seismic risk on existing dams. Part I: an example of masonry structure