2 Ewald Puchwein, Volker Springel, Debora Sijacki, & Klaus Dolag 2 METHODS 2.1 The simulations c ○ 0000 RAS, MNRAS 000 , 000–000 We have carried out high-resolution cosmological hydrody- namical simulations of a large sample of galaxy clusters and groups, including a treatment of star formation and feed- back processes. We will here mainly focus on analyzing the distribution of stars in the formed objects. To this end we develop and intercompare several distinct methods to mea- sure the following components in our simulated clusters: the central galaxy (BCG), 1 the satellite galaxies (i.e. all other cluster member galaxies), and the ICL. We then investigate the properties of these components and their relation to each other. of massive galaxy clusters is known. On the other hand, if there is indeed a significant component of intracluster stars, correctly accounting for them may relax the reported ten- sions. The distribution and abundance of intracluster stars were also investigated based on cosmological hydrody- namical simulations of galaxy cluster formation that in- cluded radiative cooling and heating, as well as models for star formation and supernova feedback (Murante et al. 2004; Willman et al. 2004; Sommer-Larsen et al. 2005; Murante et al. 2007; Dolag et al. 2009). The origin of intracluster stars was studied in particular detail in Murante et al. (2007) finding an ICL fraction that rises with halo mass from ∼ 10% at the group scale to ∼ 30% for mas- sive clusters. In their simulations, about half of the intraclus- ter stars came from galaxies associated with the merger tree of the BCG, and most intracluster stars were liberated from their former host galaxies during merger events after redshift z = 1. Using similar simulations but a different method to identify the ICL, Dolag et al. (2009) obtained average ICL fractions of around ∼ 33%, with a significant scatter on the group scale. No trend of the mean ICL fraction with halo mass was detected when their new ICL definition was used. In this work, we explore whether AGN feedback can also resolve discrepancies between simulated and observed cluster galaxy populations, and in particular, between the amount of intracluster light. Our high-resolution simulation set is well suited to investigate the origin of the ICL because for the first time a large simulated sample of galaxy clusters and group is available which can resolve the cluster galaxy populations down to very low galaxy masses and at the same time includes a successful model for the growth and feedback activity of AGN. A major problem of most hydrodynamical cluster sim- ulations thus far has been that they suffered from exces- sive “overcooling” within the densest cluster regions, where the gas cooling times are short. As a result, an unrealis- tically large fraction of cold gas and consequently a large amount of stars in clusters formed from the strong cool- ing flows. This in turn leads to central galaxies that are too bright and too blue, as well as extremely high total stellar fractions. It is widely believed that some source of non-gravitational energy input, like heating by active galac- tic nuclei (AGN), is necessary to offset the cooling in cluster cores and to make simulated clusters compatible with obser- vations. In Sijacki et al. (2007) and Puchwein et al. (2008) it was shown that including a model for AGN feedback in such simulations, indeed, strongly improves the agreement between simulated and observed X-ray properties of clusters and groups (see also McCarthy et al. 2009). In brief, we have selected dark matter halos from the Millennium simulation (Springel et al. 2005b) at z = 0 and resimulated them at higher mass and force resolution, in- cluding a gaseous component and accounting for hydrody- namics, radiative cooling, heating by a UV background, star formation and supernovae feedback. For each halo, at least two kinds of resimulations were performed. One containing the physics just described, and an additional one that also included a model for feedback from active galactic nuclei (AGN). We note that the original halo selection was only based on mass and otherwise random. New initial condi- tions for the resimulations were created by populating the Lagrangian region of each halo in the original initial condi- tions with more particles and adding additional small-scale power, as appropriate. At the same time, the resolution has been progressively reduced in regions that are sufficiently distant from the forming halo. Gas has been introduced into the high-resolution region by splitting each parent particle into a gas and a dark matter particle. Our simulated galaxy cluster and group sample is described in detail in Puchwein et al. (2008). In this work we use the 16 most massive objects of the sample. They approximately uniformly cover the mass range from M crit 200 = 2 × 10 $^{13}$M ⊙ to 1 . 5 × 10 $^{15}$M ⊙ . 2 We have adopted the same flat ΛCDM cosmology as in the parent Millennium simulation, namely Ω m = 0 . 25, Ω Λ = 0 . 75, h = 0 . 73, n$_{s}$ = 1 and σ 8 = 0 . 9. A baryon density of Ω$_{b}$ = 0 . 04136 has been chosen for consistency with the cosmic baryon fraction inferred from current cosmological constraints (Komatsu et al. 2008). The simulations were run with the GADGET-3 code This paper is structured as follows. In Section 2 we de- scribe our simulation set, the numerical models used, and the analysis methods we employ for measuring the ICL com- ponent in the simulations. We also summarize the tests we have carried out to investigate the robustness of our results with respect to numerical parameters and variations in the star formation model. In Section 3, we present our main results on the origin and amount of ICL found in our simu- lations, as well as on the properties of the simulated cluster galaxy populations. Finally, we summarize our findings and give our conclusions in Section 4. 1 The central galaxy, i.e. the galaxy closest to the minimum of the cluster potential well, is typically also the brightest cluster galaxy, except for very rare exceptions. For simplicity, we always refer to the central galaxy of a simulated cluster or group when we use the abbreviation BCG. 2 Throughout this paper, spherical overdensity masses and radii will be denoted by the symbols M and r , where we use the su- perscripts ”crit” or ”mean” to indicate whether the overdensity is with respect to the critical density of the Universe or the mean matter density of the Universe at the cluster redshift, respectively. The subscripts 200 and 500 indicate how many times larger the mean density inside the corresponding spherical region is com- pared to the chosen reference density.