  The ultraviolet background (UVB) emitted by quasars and galaxies governs the
ionization and thermal state of the intergalactic medium (IGM), regulates the
formation of high-redshift galaxies, and is thus a key quantity for modeling
cosmic reionization. The vast majority of cosmological hydrodynamical
simulations implement the UVB via a set of spatially uniform photoionization
and photoheating rates derived from UVB synthesis models. We show that
simulations using canonical UVB rates reionize and, perhaps more importantly,
spuriously heat the IGM, much earlier z ~ 15 than they should. This problem
arises because at z > 6, where observational constraints are nonexistent, the
UVB amplitude is far too high. We introduce a new methodology to remedy this
issue, and we generate self-consistent photoionization and photoheating rates
to model any chosen reionization history. Following this approach, we run a
suite of hydrodynamical simulations of different reionization scenarios and
explore the impact of the timing of reionization and its concomitant heat
injection on the the thermal state of the IGM. We present a comprehensive study
of the pressure smoothing scale of IGM gas, illustrating its dependence on the
details of both hydrogen and helium reionization, and argue that it plays a
fundamental role in interpreting Lyman-alpha forest statistics and the thermal
evolution of the IGM. The premature IGM heating we have uncovered implies that
previous work has likely dramatically overestimated the impact of
photoionization feedback on galaxy formation, which sets the minimum halo mass
able to form stars at high redshifts. We make our new UVB photoionization and
photoheating rates publicly available for use in future simulations.
