Determination of the event centrality in the WA97 and NA57 experiments