Calculation of pressure distribution in an electron storage ring and comparison with monitored pressure and beam lifetime