  Ultra-peripheral collisions (UPCs) of heavy ions can be used as a clean
environment to study two-photon induced interactions such as dilepton pair
photoproduction. Recently, precise data on lepton pair production in UPCs were
obtained by the ATLAS experiment at the LHC where significant deviations, of up
to 20%, from available theoretical predictions were observed. In this work, we
present a Monte Carlo event generator, Upcgen, that implements a refined
treatment of the photon flux allowing us to improve the agreement with ATLAS
data at large dilepton rapidities. Besides, the new generator offers a
possibility to study photon polarization effects and set arbitrary values of
the lepton anomalous magnetic moment that can be used in the future studies of
tau g-2 via ditau production measurements in UPCs.
