{'fraction_non_alphanumeric': 0.04246294734305338, 'fraction_numerical': 0.029184239064947583, 'mean_word_length': 4.544628540887226, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The age gradients of galaxies in EAGLE: outside-in quenching as the origin of young bulges in cluster galaxies

Many disc galaxies in clusters have been found with bulges of similar age or younger than their surrounding discs, at odds with field galaxies of similar morphology and their expected inside-out formation. We use the EAGLE simulations to test potential origins for this difference in field and cluster galaxies. We find, in agreement with observations, that on average disc-dominated field galaxies in the simulations have older inner regions, while similar galaxies in groups and clusters have similarly aged or younger inner regions. This environmental difference is a result of outside-in quenching of the cluster galaxies. Prior to group/cluster infall, galaxies of a given present-day mass and morphology exhibit a similar evolution in their specific star formation rate (sSFR) profiles. Post-infall, the outer sSFRs of group and cluster galaxies significantly decrease due to interstellar medium stripping, while the central sSFR remains similar to field galaxies. Field disc galaxies instead generally retain radially increasing sSFR profiles. Thus, field galaxies continue to develop negative age gradients (younger discs), while cluster galaxies instead develop positive age gradients (younger bulges).

The inside-out formation of massive galaxies (and its absence in lower mass galaxies) may be a result of black hole feedback. Comparing simulations run both with and without active galactic nuclei (AGN) feedback, both Appleby et al. (2020) and Nelson et al. (2021) (comparing the SIMBA and IllustrisTNG simulations, respectively) found that AGN feedback was necessary to suppress the central star formation in galaxies (star formation feedback alone was not sufficient).
In the denser environment of galaxy clusters the picture is somewhat different. Both spiral and S0 galaxies in the clusters have been found to have bulges that are generally of similar age or younger than the surroundings discs (Bedregal et al. 2011;Roediger et al. 2011Roediger et al. , 2012Johnston et al. 2014; Barsanti et al. 2021). If the progenitors of these cluster galaxies were similar to present-day field galaxies, then a simple fading or galaxy-wide quenching scenario for the origin of the cluster galaxies would appear to be ruled out. The transformation process may quench the star formation in such galaxies from outside-in (Bedregal et al. 2011) or result in a secondary episode of star formation in the bulge (Johnston et al. 2014) to explain the observations. Alternatively, the difference between field and cluster galaxies could be a result of a form of progenitor bias (Woo et al. 2017), where the field progenitors of the cluster galaxies were markedly different from present-day field galaxies.
In this work, we use the EAGLE simulations Crain et al. 2015) to test the environmental dependence of galaxy age gradients and whether the observed positive age gradients in cluster galaxies may be a result of outside-in quenching, secondary episodes of star formation, or progenitor bias. This paper is organised as follows. In Section 2 we describe the EAGLE simulations and analysis of the simulated galaxies. In Section 3 we present the results on age differences in EAGLE galaxies, the dependence on mass, environment and morphology and its origin in the simulations. Finally, we discuss and summarise the conclusions of this work in Sections 4 and 5.

EAGLE simulations
This work analyses the galaxies from the Evolution and Assembly of GaLaxies and their Environments (EAGLE) project Crain et al. 2015). The EAGLE project is a suite of cosmological hydrodynamical simulations of galaxy and evolution formation in the Λ cold dark matter (ΛCDM) cosmogony. The simulations adopt cosmological parameters consistent with a Planck Collaboration (2014) cosmology, in particular using Ω m = 0.307, Ω Λ = 0.693, Ω b = 0.04825, ℎ = 0.6777 and 8 = 0.8288. The simulations were run with a highly modified version of G 3 (Springel 2005), which includes routines for radiative cooling, star formation, stellar evolution, stellar feedback, black holes (BHs) and AGN feedback (see Schaye et al. 2015, for details).
The feedback prescriptions (both stellar and BH) in EAGLE were calibrated to produce galaxies with realistic stellar masses and sizes and BH masses at ≈ 0 . The EAGLE simulations are well studied and have been shown to broadly reproduce many features of the evolving galaxy populations, such as the galaxy stellar mass function  and sizes (Furlong et al. 2017), galaxy colours and star formation rates Trayford et al. 2015Trayford et al. , 2017, galaxy morphologies (Bignone et al. 2020), cold gas properties (Lagos et al. 2015;Bahé et al. 2016;Crain et al. 2017) and circumgalactic and intergalactic absorption system properties (Rahmati et al. 2015;Oppenheimer et al. 2016;Turner et al. 2016).
Structures were identified in the simulation snapshots using the friends-of-friends (FOF, Davis et al. 1985) and (Springel et al. 2001;Dolag et al. 2009) algorithms. Dark matter haloes were first identified by running the FoF algorithm on the dark matter particles with a linking length of 0.2 times the mean interparticle separation. Bound subhaloes (galaxies) were then identified within the FoF groups with subfind. In each FoF halo, the subhalo containing the particle with the minimum gravitational potential is defined as the central galaxy and all others are defined as satellite galaxies. To link galaxies between snapshots, galaxy merger trees were created using the D-Trees algorithm (Jiang et al. 2014;Qu et al. 2017).
In this work we analyse the EAGLE reference simulation (Ref-L100N1504) of a periodic volume 100 comoving Mpc on a side with 1504 3 gas and dark matter particles. Initial gas and dark matter particle mass are = 1.8 × 10 6 M and dm = 9.7 × 10 6 M , respectively, while the maximum gravitational softening length is 0.7 proper kpc.

Galaxy sample and analysis
In this work we perform a qualitative comparison with observational studies, since we cannot apply the same techniques (e.g. SED fitting or Lick index analysis) and systematic differences exist between different studies (e.g. due to adopted stellar population models or the adoption of light-or mass-weighted ages, as discussed by Barsanti et al. 2021). Moreover, each study often applies unique definitions for bulges/discs or inner/outer galaxy (such as spectroscopic bulge-disc decomposition in Johnston et al. 2014or radial limits in Fraser-McKelvie et al. 2018. With this in mind, we analyse the EAGLE galaxies in an observationally-motivated way as follows. We first restrict the sample of simulated galaxies to those with stellar masses * ( < 30 kpc) > 10 9 M at = 0, where the particles are bound to the galaxy according to the algorithm. This limit is similar to observed galaxy samples (e.g. Fraser-McKelvie et al. 2018). Following the galaxy merger trees (Qu et al. 2017), we also analyse the main progenitors of the = 0 galaxies at redshifts 0.5, 1 and 2.
Next, we define an outer radius limit within which to analyse the galaxies. Projecting the galaxies in the -plane of the simulation volume (i.e. random orientations) we calculate galaxy surface brightnesses within 1 kpc annuli from the centre of potential. The luminosities of star particles were calculated using (Conroy et al. 2009;Conroy & Gunn 2010), assuming simple stellar populations for each particle and no dust attenuation. For each galaxy we calculate 25 , the radius at which the -band surface brightness drops below 25 mag arcsec −2 . Galaxies with a maximum surface brightness fainter than 25 mag arcsec −2 were excluded from the sample.
We define the effective radius for each galaxy ( eff ) as theband half-light radius with 25 (typically 25 ≈ 3 eff ). The massweighted average ages and metallicities of stars were calculated in the inner ( < eff ) and outer ( eff < < 25 ) regions of each galaxy. 1 We show two example age profiles in Fig. 1, indicating the inner and outer mass-weighted ages in each case.
To compare the environmental dependence of galaxy age gradients, we use the halo virial mass 200 as a proxy for environment. 200 is defined as the total mass within 200 , the radius within which the mean density is 200 times the critical density (3 2 /8 ). We break the galaxy sample into 'field' galaxies ( 200 < 10 13 M ), 'galaxy groups' (10 13 ≤ 200 /M < 10 14 ) and 'galaxy clusters' ( 200 ≥ 10 14 M ).
We also investigate the effect of galaxy 'morphology'. We use the kinematic morphology indicator co,rot , the fraction of stellar kinetic energy invested in ordered co-rotation ( co,rot is tightly correlated with properties such as rot / and spin parameter * ; Correa et al. 2017;Thob et al. 2019). We break the galaxy sample into 'spheroids' 1 We also investigated fitting Sérsic (1963) + exponential profiles and splitting the galaxies into bulge + disc (somewhat similar to Fraser-McKelvie et al. 2018), but found the results for age differences were consistent with dividing the galaxies at eff . Therefore we adopt the simpler method of dividing the galaxies at eff , which is also applicable for spheroidal galaxies and bulge-less galaxies (exponential discs). ( co,rot < 0.35), 'S0-like' galaxies (0.35 < co,rot < 0.45) and 'latetype' (disc dominated) galaxies ( co,rot > 0.45). We also further break the later group into 'moderately discy' (0.45 < co,rot < 0.6) and 'very disc-dominated' ( co,rot > 0.6) galaxies. We note however that there will not be a perfect correlation between co,rot and visual morphology. For example, a disc-dominated ( co,rot > 0.45) galaxy with active star formation may appear as a spiral galaxies, while a quenched galaxy with similar co,rot would appear to be an S0 galaxy.

Star formation peak finding
In Section 3.3 we investigate the occurrence of secondary star formation peaks in galaxies. We search for star formation peaks using the method as follows: • We determine the star formation histories of the galaxies in intervals of 1 Gyr width. We chose a relatively wide interval given we are not concerned with brief fluctuations (e.g. periodic episodes from star formation followed by stellar feedback) but protracted periods of quiescence followed by reinvigorated star formation.
• We then search for maxima and minima in the formation histories. Valid peaks are defined to occur once the star formation history has increased by more than 50 per cent from the previous minimum.
• Once a maximum has been achieved, the peak is defined to end once the star formation history has dropped by a factor 1/1.5 (as before, the peak must be 50 per cent above minimum). Following a valid minimum, we may then search for the next maximum/star formation peak (if one occurs).
• Peaks below a mass fraction of 1 per cent are ignored due to possible noise from the coarse particle mass resolution (∼ 10 6 M ) and given they contribute little to the mass budget of the galaxy.

Inner/outer age differences
In the upper panel of Fig. 2 we first compare the age difference between the inner and outer regions (divided at eff ) of galaxies as a function of galaxy mass, galactic environment ( 200 ) and kinematic morphology ( co,rot ). For reference, in Appendix A we also compare metallicity and colour differences for the same galaxies. The ages and metallicities for each region (inner/outer galaxy) are both calculated as mass-weighted means. We note that there are few low-mass, very disc-dominated galaxies (< 10 10 M , co,rot > 0.6, the median masses of such galaxies in all environments are in the range 10 10.2 -10 10.5 M ). This appears particularly evident for cluster galaxies ( 200 ≥ 10 14 M ), relative to field galaxies ( 200 < 10 13 M ), which is a result of poor sampling and the binning procedure in Fig. 2 (598, 81 and 47 field, group and cluster galaxies, respectively). The lack of such galaxies is possibly due to the minimum galaxy size and disc thickness imposed by the polytropic equation of state used in EAGLE Furlong et al. 2017) and/or mass segregation from unequal baryonic and dark matter particle masses resulting in spurious collisional heating (Ludlow et al. 2019(Ludlow et al. , 2021. However, observed galaxies on the star formation main sequence also show a decrease in spin parameter for stellar masses < 10 10 M (Wang et al. 2020). In Appendix B, we compare the age differences in two different EAGLE model variations (higher resolution model and modified AGN feedback), finding good agreement with the reference model. Therefore for the remainder of this work we focus on the reference model given the larger volume and number of galaxies.
We find that the median age differences in EAGLE galaxies are generally less than ∼ 1 Gyr (with the exception of low-mass, field spheroidal galaxies), i.e. the inner and outer ages of galaxies are correlated, though the average age of galaxies scales with galaxy mass due to downsizing (Bower et al. 1992;Cowie et al. 1996;Gallazzi et al. 2005). A correlation between inner and outer ages has been similarly found for observed galaxies (e.g. MacArthur et al. 2004;González Delgado et al. 2014;Fraser-McKelvie et al. 2018;Pak et al. 2021), though the magnitude of the differences will of course depend on measurement details (e.g. light-versus mass-weighted ages).
For field galaxies ( 200 < 10 13 M ) there is a clear trend between age difference and co,rot , such that very discy galaxies ( co,rot > 0.6) have negative age gradients (younger outer regions) while spheroidal galaxies ( co,rot < 0.35) have positive gradients (older outer regions). There is also a mild trend with galaxy mass (most pronounced for spheroidal galaxies), such that low mass galaxies predominantly have younger inner regions, while massive galaxies tend to have younger outer regions (or no age difference). These results are in line with the trends found for observed galaxies, with low-mass galaxies Outer−inner galaxy age differences as a function of galaxy mass, with the galaxies divided into subsamples by environment (panels) and morphology ( co,rot , lines coloured according to legend). The lines show running medians for each subsample as a function of galaxy mass, calculated with a fixed number of galaxies using a bin width of one tenth the sample size (with a minimum number of 20 and maximum number of 100 galaxies per bin) and incrementing the bin by one fifth the bin size for each measurement. While disc-dominated ( co,rot > 0.45) field galaxies show negative age differences (younger outer regions) in the median, such galaxies in groups and clusters tend to show near zero or positive age differences in groups and clusters.
In contrast with field galaxies, the age differences of group (10 13 < 200 /M < 10 14 ) and cluster ( 200 > 10 14 M ) galaxies predominantly show younger inner regions or little age difference. Again, this result is in good agreement with observational findings that late-type and S0 galaxies in clusters have bulges of similar age to or younger than their surrounding discs (Bedregal et al. 2011;Roediger et al. 2011Roediger et al. , 2012Johnston et al. 2014;Barsanti et al. 2021). There is less dependence on morphology in the age differences (particularly in clusters) with mainly co,rot > 0.6 galaxies showing more negative age differences. As we later discuss in Section 3.4, the near-zero age difference for co,rot > 0.6 galaxies is due to their later group/cluster infall times, such that they develop larger negative age differences prior to infall.
Massive ( * > 10 10.5 M ) spheroidal ( co,rot < 0.35) galaxies show almost no age differences across all environments. This is potentially a result of the increasing contribution of mergers to the formation of massive galaxies (e.g. Rodriguez-Gomez et al. 2016;Clauwens et al. 2018;Davison et al. 2020), which may act to erase any existing age gradients.

Extent of recent star formation
To investigate the cause of positive age gradients in group and cluster galaxies at late times, we first compare the distribution of starforming gas in the galaxies. In Fig. 3 we compare the median ratio of the half-mass radius of star-forming gas to the galaxy effective radius, for galaxies containing any star-forming gas. Star-forming gas is defined as that with a temperature within 0.5 dex of temperature floor/equation of state imposed in EAGLE (to prevent spurious fragmentation, see Schaye et al. 2015, for details).
The trends found between the distribution of star-forming gas and galaxy mass, environment and morphology echo those found for inner/outer galaxy age differences in Fig. 2. The star-forming gas distribution in massive, discy, field galaxies ( co,rot > 0.35, * > 10 10 M ) is more extended than the stellar distributions as a whole, as expected from their negative age gradients (Fig 2). Over time (and depending on the SFR) these galaxies would be expected to grow in size and develop negative age gradients. In contrast, star-forming gas in group and cluster galaxies (of all types) is generally more compact than the galaxy size. Thus, group and cluster galaxies would be expected to develop positive age gradients (as found in Fig 2). A similar correlation has been found for observed star-forming galaxies, where the ratio of the half-light radii for H and continuum emission ( 50,H / 50,cont ) decreases in denser environments (Schaefer et al. 2017).
These results indicate that recent star formation plays a major role in the difference between field and cluster galaxies. However, this difference may have a number of causes (e.g. late inner star formation peaks, outside-in quenching, etc.) which we discuss in the following sections.

Inner star formation peaks
To quantify whether the younger bulge ages (relative to the discs) of cluster galaxies is due to late, centrally concentrated episodes of star formation (as proposed by Johnston et al. 2014), we determine the fraction of galaxies with secondary peaks in their star formation history. We search for star formation peaks using the method described in Section 2.3. Briefly, we define peaks in the star-formation histories where the maximum is > 50 per cent above the previous minimum. Fig. 4 shows fraction of galaxies with a significant secondary inner peak (peak amplitude at least 25 per cent of the maximum peak), where the peak happens at least 1 Gyr after a significant peak in the outer galaxy (i.e. coincident inner/outer peaks are not counted). Less than ∼ 30 per cent of massive (> 10 10 M galaxies have secondary M 200 ≥ 10 14 M 0.6 ≤ κ co,rot < 1 0.45 ≤ κ co,rot < 0.6 0.35 ≤ κ co,rot < 0.45 0 ≤ κ co,rot < 0.35 Figure 3. Half-mass radius of star-forming gas relative to = 0 galaxy effective radius, i.e. a measure of the concentration of the most recent star formation in the galaxies. Galaxies are divided into subsamples by = 0 environment and morphology as in Fig. 2. The trends of recent star formation extent follow those found for the inner/outer age differences in Fig. 2, indicating recent star formation in galaxies plays a major role in setting the age differences. M 200 ≥ 10 14 M 0.6 ≤ κ co,rot < 1 0.45 ≤ κ co,rot < 0.6 0.35 ≤ κ co,rot < 0.45 0 ≤ κ co,rot < 0.35 Figure 4. Fraction of galaxies that experience a secondary (or more) peak of star formation in the inner galaxy (within eff ) with an amplitude at least 25 per cent of the maximum peak, and is not coincident with a peak in the outer galaxy (peaks offset by at least 1 Gyr). Generally less than 30 per cent of group and cluster galaxies have secondary star formation peaks, similar to field galaxies, suggesting younger inner regions of galaxies are generally not due to late, central star formation peaks.
peaks, over all environments. Group and cluster galaxies also do not have significantly higher occurrences than field galaxies. The results are not strongly sensitive to the exact fraction adopted, remaining less than ∼30 per cent for 5 and 10 per cent secondary peak amplitudes.
For low-mass galaxies (< 10 10 M ) the fraction of secondary inner peaks depends somewhat on environment and morphology. For spheroidal galaxies, secondary peaks are more common in field dwarf galaxies, with group and cluster galaxies having lower fractions. This may be due to star formation quenching following group/cluster infall, with low-mass cluster galaxies having typical infall redshifts of ∼ 1 (see Fig. 6). The strongest dependence on morphology also occurs in clusters, where more disc dominated (higher co,rot ) galaxies have a higher fraction of secondary peaks. Again, this may be caused by the later infall times of more disc-dominated galaxies (Fig. 6), allowing them to remain star forming for longer. Therefore in the EAGLE simulations, younger inner regions for group and cluster galaxies are, on average, not due to late starformation peaks associated with quenching. Such an effect may therefore only be important in a subset of galaxies. Instead, the inner regions of galaxies must have continued star formation over a longer period, relative to the outer regions. In the following section, we discuss whether this effect may be purely environmental (e.g. through ram pressure stripping) or if the difference between field and group/cluster galaxies was in place prior to infall (progenitor bias).

Age differences
If the progenitors of spiral/S0 galaxies in clusters were similar to present-day spirals, which then underwent further central star formation prior to quenching, we would expect the progenitors would initially show a negative age gradient (younger disc) before a reversal of the gradient after cluster infall. We investigate this scenario in Figs. 5, where we compare the age differences from redshifts 2 to 0 for the progenitors of galaxies from Fig. 2. As previously, galaxies . Redshift evolution of outer−inner age differences (relative to eff at each redshift) for the main progenitors of galaxies in Fig. 2. The upper, middle and bottom rows of panels show 'field', 'group' and 'cluster' galaxies (at = 0). In each row, co,rot of the galaxies at = 0 increases from left (spheroids) to right (very disc dominated). Line colours scale with the redshift of the progenitor galaxies. Progenitors of disc-dominated galaxies ( co,rot > 0.45) in groups and clusters (right columns, middle and bottom rows) begin to develop negative age differences by ∼ 0.5, with similar magnitudes to field galaxies (right columns, upper row), before being transformed into positive or near-zero age differences. The transformation time is related to the group/cluster infall time (see Fig. 6).
For field galaxies (upper row in Fig. 5) the age gradients develop gradually. On average, the galaxies that will be more spheroid at = 0 ( co,rot ( = 0) < 0.45) have age gradients that become more positive with time, while the inverse is true for the progenitors of disc-dominated galaxies ( co,rot ( = 0) > 0.45). For group and cluster galaxies the evolution of the age gradients is somewhat different. For spheroidal galaxies ( co,rot < 0.35), the age gradients are largely set by ≈ 0.5, which is consistent with such galaxies being largely quenched by this time. For very discy galaxies ( co,rot > 0.6), they do indeed develop negative age gradients at = 0.5, before the gradients being largely erased by = 0. For intermediate galaxies (0.35 < co,rot < 0.6) in groups and clusters, they tend not to develop strong age gradients up to ≈ 0.5, before developing positive age gradients (younger inner regions) by = 0.
In Fig. 6 we show the median infall times of = 0 satellite galaxies (the latest snapshot at which the galaxy becomes a satellite subhalo in a FOF group), according to galaxy mass, environment and morphology as in Fig. 2. There is a strong correlation between infall redshift and co,rot , such that high co,rot galaxies are late infallers. For co,rot > 0.45 (disc-dominated galaxies) infall redshifts for groups/clusters occur at 0.5. Indeed, at similar redshifts, galaxy clusters are observed to have a far higher proportion of blue and latetype galaxies than at the present day (Butcher & Oemler 1978Couch et al. 1994Couch et al. , 1998. The time of the reversal of the age gradient for disc-dominated galaxies in groups/clusters (Fig. 5) thus appears to be related to the infall times of the galaxies into the group/cluster environment. At ≈ 0.5, the age differences (Fig. 5) of group/cluster progenitors of disc galaxies were similar to that of the progenitors of field galaxies at the same redshift. Therefore, some of the age gradient difference between field and cluster galaxies is a result a progenitor bias. At the time of infall, cluster progenitor galaxies do not begin with the steeper age gradients of present-day field galaxies, but the flatter gradients of higher redshift galaxies. For galaxies with very negative age gradients, such as disc-dominated galaxies at the present day, quenching may occur too quickly to fully reverse the age gradients. The difference in evolution following group/cluster infall therefore likely has an environmental origin, which we investigate in the next section.

Specific star formation profile evolution
We investigate the effect of environment on the star formation of galaxies by comparing the evolution of the radial sSFRs in Fig. 7. Galaxies are first grouped by = 0 stellar mass (each row in the figure), co,rot at = 0 (panel in each row) and compared by environment in each panel (solid, dash-dotted and dotted lines for 'field', 'group' and 'cluster', respectively). Each colour shows the evolution of the sSFR profiles for the progenitor galaxies from = 2 to = 0. The SFRs in each radial bin were calculated as the mass in stars formed within 300 Myr at each snapshot, with the projected radii of star particles in each galaxy scaled by eff of the progenitor galaxy at that redshift. For each galaxy mass and morphology subgroup, we calculate the median sSFR for galaxies with SFR > 0.
The sSFR profiles of progenitors of a given mass/morphology are similar between field and group/cluster galaxies prior to the typical infall redshift (Fig. 6), explaining the similar age gradients in Fig. 5. For example, disc-dominated galaxies ( co,rot > 0.45) in all environments have similar sSFR profiles up to infall redshifts 0.5. For massive spheroidal galaxies ( * > 10 10 M , co,rot < 0.35), the sSFR profiles for galaxies in group and cluster environments already begin to deviate by ≈ 1.
Post infall, the sSFR profiles for galaxies of a given mass and morphology then begin to differentiate by environment. In general, denser environments show sSFR profiles that are steeper and truncated at smaller galactocentric radii. This difference is most drastic at 1 eff , where the sSFRs of group and cluster galaxies are suppressed relative to field galaxies (for all morphologies). The central sSFRs ( 0.5 eff ) instead remain relatively similar in all environments. The cold gas consumption times ( g,cold /SFR) is typically 2-3 Gyr for these galaxies, even those with suppressed outer sSFRs, meaning the centres of the galaxies may remain star forming for a significant time without further gas removal. Thus, the galaxies in group/cluster environments are being quenched from outside-in, which explains their younger centres (positive age gradients) relative to field galaxies of a similar morphology.

Transformation of cluster galaxies
The different age gradients of field and cluster disc galaxies (both spirals and S0s, e.g. Roediger et al. 2011;Johnston et al. 2014) suggests different formation paths or transformation processes are at play for different environments. Analysing the EAGLE simulations, we find that ISM stripping is likely the key driver of these age differences. Outside-in quenching results in centrally concentrated star formation prior to complete quenching of the cluster galaxies, explaining the younger centres of the cluster galaxies. The results in this work thus support the hypothesis that spiral galaxies are transformed into S0 galaxies in dense environments through outside-in quenching (e.g. Bedregal et al. 2011).
The decreased outer sSFRs of cluster galaxies in the simulations also agree with the observations of cluster galaxies. Relative to field galaxies, Virgo cluster spiral galaxies have truncated H discs and outer SFRs decreased by factors of 1.5-9, while inner SFRs are similar or enhanced up to a factor of 1.7, suggesting ISM stripping as the most likely origin (Koopmann & Kenney 2004a,b). Schaefer et al. (2017) also found that H emission becomes more concentrated (relative to the continuum emission) for galaxies in denser environments. Recently, Matharu et al. (2021) found evidence for outside-in quenching of cluster galaxies at ∼ 1. They found that recently quenched cluster galaxies have significantly more concentrated H emission compared to star-forming galaxies of similar mass, and similarly suggest ram-pressure stripping as the likely cause.
We find this transformation to centrally concentrated star formation for cluster galaxies is (on average) coincident with their infall times (first time the galaxies become a satellite in a group/cluster; Fig. 6), typically occurring at redshifts 0.5 for disc-dominated galaxies (with the most disc-dominated galaxies at = 0 having the latest infall times). Observations of galaxy clusters at similar redshifts show they have a far higher proportion of spiral galaxies than clusters at the present day (Couch et al. 1994(Couch et al. , 1998Fasano et al. 2000;Desai et al. 2007), consistent with recent infall prior to transformation into S0 galaxies at later redshifts.
In such distant galaxy clusters ( ≈ 0.3) approximately 30 per cent of galaxies are found to be undergoing secondary episodes of star formation (Couch & Sharples 1987;Barger et al. 1996), which appear to be systems involved in mergers (Couch et al. 1998). In Section 3.3 we find < 30 per cent of cluster galaxies have undergone secondary central episode of star formation. This does not necessarily imply tension between observations and simulations given the very different methods used, and that we exclude any galaxies that  Fig. 2. Approximately 25, 93 and 99 per cent of the total galaxies are satellite galaxies in field, group and cluster environments, respectively (i.e. infall redshift if less relevant for field galaxies, where the majority are central galaxies of their halo). Infall redshift is correlated with both co,rot and 200 , such that galaxies with lower co,rot (more spheroidal) and higher 200 (denser environments) have earlier infall times. undergo galaxy-wide or only outer secondary episodes (the fraction of galaxies with secondary episodes of star formation of course increases when relaxing these restrictions, by a factor ≈ 2 on average). Future work should use consistent methods to determine if the fraction of galaxies in high-redshift clusters with secondary star formation episodes can be explained in large-scale hydrodynamical simulations.

Limitations of the EAGLE model
Predictions for the age gradients of galaxies may of course depend upon the details of the simulation being analysed. Particularly relevant for this work, the central SFRs of simulated galaxies have been shown to depend upon the implementation of AGN feedback (Appleby et al. 2020;Nelson et al. 2021). Lagos et al. (2020) found low velocity dispersions in centres of massive ( * > 10 10 M ) EAGLE galaxies, which they find is related to young stellar populations. This may also be connected to the too centrally-concentrated sSFR profiles found for EAGLE galaxies below the main star-forming sequence ("green valley" galaxies) (Starkenburg et al. 2019). These findings suggest, although effective on a galaxy-wide scale, AGN feedback in EAGLE may be insufficient to quench the central star formation in massive galaxies. We also note that the density profiles of massive EAGLE galaxies are insufficiently concentrated (i.e. deficient in stellar mass near the centres of the galaxies, potentially due to spatial resolution and cooling floor limits, de Graaff et al. 2021), which may exacerbate the discrepancy in sSFR at galactic centres.
In Appendix B (Fig. B2) we investigated an EAGLE model variation which implements a higher AGN heating temperature (AGNdT9-L050N0752, the model provides a better match to X-ray observations of intragroup and intracluster gas) in order to test whether more effective AGN feedback affects the resulting age gradients. However, we find very similar age differences to the EAGLE reference model (Fig. 2). How these findings of insufficient central quenching may affect the age gradient predictions is not clear (e.g. whether this implies an offset to younger outer regions for all galaxy types, only green valley galaxies, or predominately the more spheroidal galaxies which tend to have more centrally concentrated star formation, Fig. 7).

SUMMARY
In this work we used the EAGLE simulations to investigate the origin of the positive age gradients in cluster spiral and S0 galaxies. We found that massive ( * > 10 10 M ), disc-dominated ( co,rot > 0.45), field galaxies ( 200 < 10 13 M ) in EAGLE have younger outer (> eff ; 'disc') regions than inner regions on average, while similar galaxies in group and cluster environments ( 200 > 10 13 M ) tend to have similarly aged or younger inner (< eff ; 'bulge') regions relative to their outer regions (Fig. 2). This result is qualitatively similar to the age gradients found for observed spiral and S0 galaxies (e.g. Roediger et al. 2011;González Delgado et al. 2014;Johnston et al. 2014;Fraser-McKelvie et al. 2018).
Lower mass galaxies in the simulations ( * < 10 10 M ) generally show near-zero or positive age differences (Fig. 2). Again, this is qualitatively consistent with that found for observed galaxies (Pérez et al. 2013;Fraser-McKelvie et al. 2018;Breda et al. 2020). Graus et al. (2019) find this is due to feedback in dwarf galaxies pushing old stars to larger radii (though spurious collisional heating may also play some role, Ludlow et al. 2019Ludlow et al. , 2021. We used the simulations to test the origins of the difference in age gradients of field and group/cluster galaxies: outside-in quenching in denser environments, late episodes of star formation in galaxy bulges and galaxy progenitor bias (where field progenitors of cluster galaxies are markedly different from present-day field galaxies). In Section 3.3 we show that late, central star formation episodes in cluster galaxies play a more minor role, typically affecting < 30 per cent of galaxy populations. The proportion of galaxies with such secondary episodes is also not significantly different from the general field population.
We found that the younger inner regions (compared to their outer regions) of cluster disc galaxies, relative to field galaxies, are a result of both progenitor bias and outside-in quenching (Section 3.4). Both field and group/cluster progenitor galaxies have similar age and sSFR gradients up to the time of group/cluster infall, after which their evolution diverges. The outer sSFRs of group/cluster galaxies significantly decrease while the central sSFRs (for those galaxies which are not yet fully quenched of star formation) are similar to field galaxies. From the flatter age gradients of higher redshift galaxies (i.e. galaxy progenitor bias), the group/cluster galaxies then develop positive 0 ≤ κ co,rot (z = 0) < 0.35 . Redshift evolution of the median sSFR radial profiles for the main progenitors of galaxies in Fig. 2, limited to galaxies with SFR > 0. The upper, middle and bottom rows show the evolution of 'low' (10 9 -10 10 M ), 'intermediate' (10 10 -10 10.5 M ) and 'high' (10 10.5 -10 11 M ) mass galaxies (mass at = 0), respectively. In each row, co,rot of the galaxies (at = 0) increases from left (spheroids) to right (very disc dominated). Solid, dash-dotted and dashed lines show galaxies from field, group and cluster environments, respectively, while line colour scales with progenitor redshift.
age gradients due to the ongoing central star formation. Field disc galaxies instead continue to develop stronger negative age gradients. Outside-in quenching of galaxies in groups/clusters is consistent with the expected effects from stripping of the interstellar medium (e.g. Koopmann

DATA AVAILABILITY
All data (including galaxy catalogues, merger trees and particle data) from the EAGLE simulations is publicly available (McAlpine et al. 2016) at http://www.eaglesim.org/database.php.

APPENDIX A: METALLICITY AND COLOUR DIFFERENCES
For reference, in this section we compare the outer−inner metallicity and colour differences for EAGLE galaxies as a function of galaxy mass, environment and morphology (as for the age differences in Fig. 2).
In Fig. A1 we compare the outer−inner metallicity differences. All galaxy subsamples show negative metallicity gradients on average, with higher co,rot (more disc dominated) galaxies showing the smallest metallicity differences. For field galaxies, the metallicity difference depends mainly on co,rot and little on galaxy mass. Group and cluster galaxies instead have a stronger dependence on galaxy mass (with higher mass galaxies showing larger metallicity differences), with less dependence on co,rot than field galaxies. This metallicity difference naturally follows the age differences found in Fig. 2, such that, relative to the inner regions of galaxies, the youngest outer regions have experienced the most self-enrichment in metallicity. The typical metallicity differences of < 0.3 dex are similar to those found in observed galaxies using a range of stellar population modelling techniques (e.g. fitting broadband colours, Roediger et al. 2011;Lick indices, Fraser-McKelvie et al. 2018; and full spectral fitting, Breda & Papaderos 2018. Fig. A2 compares some commonly investigated colours in the literature (e.g. Prochaska Chamberlain et al. 2011;Mishra et al. 2017), namely − , − and − (for SDSS bands , and , 2MASS ). For field galaxies ( 200 < 10 13 M ), low mass galaxies ( * < 10 10 M ) tend to have redder outer regions, consistent with their positive age differences in Fig. 2, with less dependence on morphology ( co,rot ). Group and cluster galaxies ( 200 > 10 13 M ) have a stronger dependence on morphology, with more spheroidal galaxies showing more negative colour differences (bluer outer regions). This stems from the smaller absolute age differences between high and low mass galaxies in group and cluster environments compared to field galaxies.

APPENDIX B: EAGLE MODEL VARIATIONS
In this section we compare the age difference predictions (Section 3.1 and Fig. 2) for two different EAGLE model variations, Recal-L025N0752 and AGNdT9-L050N0752 .
Recal-L025N0752 has 8 times higher mass resolution ( = 2.25 × 10 5 M ) and 2 times small gravitational softening (maximum 0.35 proper kpc) compared to the reference model, and uses recalibrated stellar and AGN feedback parameters to better match the ∼ 0 galaxy stellar mass function at this resolution. The periodic volume has a side length of 25 comoving Mpc, and thus a volume 64 times smaller than the reference mode.
AGNdT9-L050N0752 uses the same resolution as reference model, but with slightly modified AGN parameters (in particular a higher heating temperature of Δ AGN = 10 9 K, compared to 10 8.5 K) to better match X-ray observations of intragroup and intracluster gas. The periodic volume has a side length of 50 comoving Mpc, and thus a volume 8 times smaller than the reference mode. Figures B1 and B2 compare the age differences for both models, computed in an identical manner as the reference model in Fig. 2. We find the results are consistent between all three models. The Ref-L100N1504 and AGNdT9-L050N0752 models show almost identical age differences as a function of mass, morphology and environment. Compared to the other models, Recal-L025N0752 shows slightly younger outer regions for disc-dominated galaxies ( co,rot > 0.45), which may be related to the slightly higher lowredshift ( ∼ 0) specific star formation rates Furlong et al. 2015), assuming these higher SFRs are associated with outer disc formation. This paper has been typeset from a T E X/L A T E X file prepared by the author. 10 13 ≤ M 200 /M < 10 14 0.6 ≤ κ co,rot < 1 0.45 ≤ κ co,rot < 0.6 0.35 ≤ κ co,rot < 0.45 0 ≤ κ co,rot < 0.35   0.6 ≤ κ co,rot < 1 0.45 ≤ κ co,rot < 0.6 0.35 ≤ κ co,rot < 0.45 0 ≤ κ co,rot < 0.35 Figure B1. As for Fig. 2, but comparing the age differences in the EAGLE high resolution model Recal-L025N0752. Given the smaller simulation volume (25 3 comoving Mpc 3 ), there are no galaxy clusters ( 200 ≥ 10 14 M ) and groups (10 13 ≤ 200 /M < 1014) are poorly sampled. We show only single points where there are too few galaxies to obtain a running median (< 25). The results are generally consistent with the EAGLE reference model, showing only slightly larger (more negative) age differences for disc-dominated galaxies ( co,rot > 0.45). 0.6 ≤ κ co,rot < 1 0.45 ≤ κ co,rot < 0.6 0.35 ≤ κ co,rot < 0.45 0 ≤ κ co,rot < 0.35 Figure B2. As for Fig. 2, but comparing the age differences in the EAGLE model variation AGNdT9-L050N0752, which implements a higher temperature for AGN feedback (10 9 K) relative the the reference model (10 8.5 K). We do not find significant differences from the EAGLE reference model.