# MusE GAs FLOw and Wind (MEGAFLOW) X. The cool gas and covering fraction of Mg II in galaxy groups

Maxime Cherrey,<fnref n="1" />* Nicolas F. Bouché,<fnref n="1" /> Johannes Zabl,<fnref n="1" />,<fnref n="2" /> Ilane Schroetter,<fnref n="3" /> Martin Wendt,<fnref n="4" />,<fnref n="5" />
Ivanna Langan,<fnref n="6" /> Johan Richard,<fnref n="1" /> Joop Schaye,<fnref n="7" /> Wilfried Mercier,<fnref n="3" /> Benoît Epinat<fnref n="8" />,<fnref n="9" /> and
Thierry Contini,<fnref n="9" />

<figure><img src="image_1.png" /></figure>

<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

Accepted 2023 November 29. Received 2023 November 29; in original form 2023 February 8

## ABSTRACT

We present a study of the cool gas ($\approx 10^4$ K) traced by Mg II absorptions around groups of galaxies in the MEGAFLOW (MusE GAs FLOw and Wind) survey. Using a combination of two algorithms, we blindly identify 32 groups of more than 5 galaxies at $0.3 < z < 1.5$ with $10.7 < \log_{10}(M/M_{\odot}) < 13.7$. Among them 26 can be used to study potential counterpart Mg II absorptions. We report that 21 out of the total 120 Mg II absorption systems present in MEGAFLOW are associated with groups. We observe that the Mg II rest-frame equivalent width ($W_{r}^{2796}$) drops at an impact parameter of $\approx 150$ projected kpc from the closest galaxy and $\approx$ one virial radius from the identified group centre indicating that Mg II haloes scale with the mass of the groups. The impact parameter where the covering fraction exceeds 50 per cent is $\log_{10}(b/kpc) = 2.17 \pm 0.47 (2\sigma)$ and $(b/R_{vir}) = 1.67 \pm 0.98$, which is $\approx 3$ times larger than for field galaxies ($\log_{10}(b/kpc) = 1.67 \pm 0.15$). Finally, we estimate the cool gas column density profile in groups (from the $W_{r}^{2796}$) and show that its shape follows closely the typical dark matter column density profile for haloes at similar redshift and masses.

**Key words:** galaxies: groups: general – galaxies: haloes – quasars: absorption lines.

## 1 INTRODUCTION

The detection of the Mg II $\lambda\lambda$[2796, 2803] absorption doublet in the spectra of background quasars is one of the most efficient way to study the cool diffuse gas surrounding foreground galaxies or groups of galaxies. Indeed the low ionization potential of the magnesium (7.6 eV) makes it a good tracer of the cool photo-ionized gas at $T \approx 10^4$ K and hence of H I (Ménard & Chelouche 2009; Lan & Fukugita 2017) that constitutes the major part of the mass of the circumgalactic medium (CGM). The Mg II doublet has the advantage to be detectable in the optical from the ground at intermediate redshifts $0.3 \lesssim z \lesssim 1.8$.

Mg II absorption systems have played a crucial role in revealing the an-isotropic nature of the CGM, representing accretion along the galactic plane and bi-conical outflows (Bordoloi et al. 2011; Bouché et al. 2012; Kacprzak, Churchill & Nielsen 2012; Tumlinson, Peeples & Werk 2017; Schroetter et al. 2019; Zabl et al. 2019, 2021).

However galaxies are not isolated objects. they are naturally clustered due to the hierarchical formation of large-scale structures. A number of them live in groups ($\lesssim 50$ members) or clusters located at the nodes of the cosmic web and it is still not clear if Mg II absorption systems are mainly associated with these overdense regions. Indeed, even if several works revealed that Mg II absorptions are often associated with multiple galaxies (Nielsen et al. 2018; Dutta et al. 2020; Hamanowicz et al. 2020), one can wonder if these observations can be explained by the natural correlation function or if they probe a favoured presence of absorptions around overdensities.

A closely related question is what drives the strength of absorptions in these environments: the galaxy properties or the dark matter (DM) haloes? Pioneering works (Churchill et al. 1999; Charlton et al. 2000; Rigby, Charlton & Churchill 2002) revealed the prevalence of weak Mg II absorbers and the diversity of absorption systems, that are often composed of several Mg II clouds. Later, Bouché et al. (2006) followed by Lundgren et al. (2009) and Gauthier, Chen & Tinker (2009) showed from purely statistical considerations that the halo mass is anticorrelated with the Mg II absorption rest-frame equivalent width ($W_{r}^{2796}$). This result indicates that strong Mg II systems are

<footnote n="1">¹Centre de Recherche Astrophysique de Lyon (CRAL) UMR5574, Université de Lyon1, Ens de Lyon, CNRS, F-69230 Saint-Genis-Laval, France</footnote>

<footnote n="2">²Institute for Computational Astrophysics and Department of Astronomy and Physics, Saint Mary's University, 923 Robie Street, Halifax, Nova Scotia B3H 3C3, Canada</footnote>

<footnote n="3">³Institut de Recherche en Astrophysique et Planétologie (IRAP), Université de Toulouse, CNRS, UPS, F-31400 Toulouse, France</footnote>

<footnote n="4">⁴Institut für Physik und Astronomie, Universität Potsdam, Karl-Liebknecht-Str. 24/25, D-14476 Golm, Germany</footnote>

<footnote n="5">⁵Leibniz-Institut für Astrophysik Potsdam, An der Sternwarte 16, D-14482 Potsdam, Germany</footnote>

<footnote n="6">⁶European Southern Observatory, Karl-Schwarzschild-Str. 2, D-85748, Garching, Germany</footnote>

<footnote n="7">⁷Leiden Observatory, Leiden University, PO Box 9513, NL-2300 AA Leiden, The Netherlands</footnote>

<footnote n="8">⁸Aix Marseille Univ, CNRS, CNES, LAM, 38 rue Frédéric Joliot Curie, 13338, Marseille, France</footnote>

<footnote n="9">⁹Canada-France-Hawaii Telescope, 65-1238 Mamalahoa Highway, Kamuela, HI 96743, USA</footnote>

<footnote>*E-mail: maxime.cherrey@univ-lyon1.fr</footnote>
not virialized but preferentially produced by outflows associated with individual galaxies rather than big haloes. This picture was reinforced by several observations of strong absorptions probably caused by outflows from individual galaxies (Nestor et al. 2011; Guha et al. 2022). In group environments, the absorption strength would hence arise from the added contributions of the individual galaxies (Bordoloi et al. 2011; Fossati et al. 2019). However, the study of the absorption kinematics in recent works points toward a more complex situation (Nielsen et al. 2018). Indeed several individual cases (Kacprzak, Murphy & Churchill 2010; Gauthier 2013; Bielby et al. 2017; Epinat et al. 2018; Leclercq et al. 2022; Nielsen et al. 2022) revealed a complex intragroup medium affected both by outflows and various interactions. Furthermore, for more massive structures like clusters, the strength of the Mg II absorption seems not to be correlated with their mass (Mishra & Muzahid 2022) nor the star formation rate (SFR) of the closest neighbour (Anand, Kauffmann & Nelson 2022) and would thus be rather caused by interactions or intracluster media.

It is important to disentangle the strength (column density and kinematics), the probability and the spatial extent of the absorptions. Several works clearly found an anti-correlation of Mg II absorption strength versus impact parameter for isolated galaxies or field galaxies but not for groups (Chen et al. 2010; Nielsen et al. 2018; Huang et al. 2021) indicating that the Mg II haloes would extend further in these environments (Bordoloi et al. 2011). Recent works also revealed that the probability to have an absorption associated with a group is significantly higher than for isolated galaxies (Nielsen et al. 2018; Dutta et al. 2020, 2021) at similar impact parameter.

The above conclusions on Mg II absorptions in dense environments are often difficult to draw for two main reasons. First the definition of what is a group is not always the same and in many cases it simply consists in having two or more galaxies in the field of view (FOV) of the instrument (which implies that the definition depends on the FOV). Second because many surveys are absorption-centric, meaning that the groups/galaxies counterparts are only searched in the vicinity of the known absorptions.

We propose here to study the cool gas around groups in the MusE GAs FLOw and Wind survey (MEGAFLOW, described in Section 2) with an approach that remedies to these two issues. For that we first quantify clearly what is an overdensity by using the two-point correlation function and identify blindly all the groups in MEGAFLOW using a combination of two algorithms (Section 3). We then study potential Mg II absorption counterparts (Section 4) and look at the Mg II absorption profile. From that we estimate the H I column density profile and compare it to the DM column density profile for a halo of similar mass (Section 5). Finally, we compute the Mg II covering fraction around groups (Section 6) and compare our results to the existing literature (Section 7). Our conclusions are presented in Section 8.

This approach is made possible by using the Multi-Unit Spectrograph Explorer (MUSE) instrument on one of the Very Large Telescopes (VLT) as it offers the possibility to identify all galaxies down to the detection limit around a quasar LOS (line of sight) by scanning spectral cubes within a FOV of $1 \times 1 \text{ arcmin}^2$ in the 4700–9350 Å wavelength range. The Mg II absorption lines are detected in the quasars spectra using high-resolution spectroscopy performed with the Ultraviolet and Visual Echelle Spectrograph (UVES, Dekker et al. 2000) in the range 3000–11000 Å.

In all this article, we use a standard flat lambda-cold dark matter cosmology with $H_0 = 69.3 \text{ km s}^{-1} \text{ Mpc}^{-1}$, $\Omega_M = 0.29$, $\Omega_\Lambda = 0.71$

(see Hinshaw et al. 2013), and the distances are all given in proper kpc.

## 2 THE MEGAFLOW SURVEY

The present work is based on the MEGAFLOW survey (Schroetter et al. 2016, 2019; Zabl et al. 2019; Bouché et al. in preparation), that aims at building a large Mg II absorptions – galaxies sample using combined observations from VLT/MUSE and VLT/UVES in 22 quasar fields. These quasars were identified in the Zhu & Ménard (2013) catalogue built with the Sloan Digital Sky Survey (SDSS) spectral observations. They were selected because they have multiple (≥3) strong Mg II absorptions ($W_r^{2796} > 0.5$ Å) at redshifts $0.3 < z < 1.5$ such that the corresponding [O II] doublet of their galaxy counterparts fall in the 4700–9350 Å range of MUSE. These selected quasars finally represent a total of 79 strong Mg II absorption systems that constitute the MEGAFLOW DR1 catalogue.

Follow-up observations were performed between 2014 and 2016 for each quasar using the VLT/UVES echelle spectrograph in order to obtain high-resolution ($R \approx 38000$, pixel size $\approx 1.3 \text{ km s}^{-1}$) ID spectra. These observations were used to identify systematically all the Mg II absorption systems in the 22 fields down to a detection limit of $W_r^{2796} \approx 0.1$ Å. Finally, 48 new absorption systems have been detected and added to the 79 already known strong absorptions to form a total of 127 absorptions that constitute the MEGAFLOW DR2 catalogue. Among them 120 have low redshifts $z < 1.5$. For each absorption system, $W_r^{2796}$ was estimated with the evolutionary algorithm from Quast, Baade & Reimers (2005) that models each absorption component as a Gaussian.

MUSE observations were performed between 2014 September and 2017 May during the Guaranteed Time of Observation (GTO) and using the Wide Field Mode. Adaptive Optics were used for 13 of the 22 fields. The cumulated exposure time per field ranges from 1 h 40 min to 11 h. The data reduction was performed using the ESO (European Southern Observatory) MUSE pipeline v1.6 (Weilbacher et al. 2012, 2014; Weilbacher, Streicher & Palsa 2016) and is described in detail in Schroetter et al. (2016), Zabl et al. (2019), and Bouché et al. (in preparation).

In total, 2460 galaxies have been detected in the 22 quasar fields using both white light images and narrow-band images produced by an algorithm that detects emission and absorption lines such as [O II], $H\beta$, Ca H&K, $Ly\alpha$, and/or [O III] (for a detailed description of the source detection process see Zabl et al. 2019). The redshift of the galaxies have been estimated by fitting their emission lines with a typical precision better than $\approx 30 \text{ km s}^{-1}$ at $z \approx 1$. Thanks to this double detection process the MEGAFLOW sample is not biased against either passive or star-forming galaxies and is 50 per cent complete to r-mag $\approx 25.5$ and to $7.7 \times 10^{-18} \text{ erg s}^{-1} \text{ cm}^{-2}$ for [O II] (Bouché et al. in preparation).

For this work, we are only interested in the 1208 galaxies that are located in the foreground of the quasars so we can study possible counterpart Mg II absorptions. Most of them have a redshift $0.3 < z < 1.5$ for which the [O II] lines fall in the range of MUSE. The [O II] flux detection limit corresponds to an un-obscured SFR limit of $0.07 \text{ M}_\odot \text{ yr}^{-1}$. The stellar masses of the galaxies are estimated, when possible, using the spectral energy distribution (SED) fitting algorithm coniecto (for details, see Zabl et al. 2016) based on the stellar continuum and assuming a Chabrier initial mass function (Chabrier 2003). The estimated stellar masses in MEGAFLOW range from $10^6$ to $10^{12} \text{ M}_\odot$ with a mean at $10^{9.3} \text{ M}_\odot$.
<table><caption>**Table 1.** Number of galaxies expected and number of galaxies found in MEGAFLOW in cylinders of radius *R* and depth 2|Δ*v*| centred on haloes of mass *M*<sub>min</sub>.</caption><thead><tr><th><i>R</i><br>(kpc)</th><th>|Δ<i>v</i>|<br>(km s<sup>-1</sup>)</th><th><i>M</i><sub>min</sub><br>(M<sub>☉</sub>)</th><th><i>r</i><sub>0</sub><br>(Mpc)</th><th><i>N</i><sub>exp</sub></th><th><i>N</i><sub>found</sub></th></tr></thead><tbody><tr><td>280</td><td>500</td><td>10<sup>11</sup></td><td>3</td><td>3.3 ± 3.1</td><td>3.2 ± 3.0</td></tr><tr><td>100</td><td>500</td><td>10<sup>11</sup></td><td>3</td><td>0.9 ± 1.3</td><td>1.1 ± 1.2</td></tr></tbody></table>

<figure><img src="image_5.png" /><figcaption>**Figure 1.** Distribution of the number of counterpart galaxies observed in the MUSE FOV around each Mg II absorption system detected in the UVES spectra in the range 0.3 < *z* < 1.5.</figcaption></figure>

# 3 GROUP IDENTIFICATION

## 3.1 Characterization of overdensities

One of the difficulties while studying dense environments is to identify and to quantify local over-densities in the first place. A common way to proceed is to count the number of galaxies in the FOV around a given redshift. If this number is above a given threshold, then these galaxies are declared to belong to a group/an overdensity. However, the threshold value is highly dependent on the size of the FOV of the instrument and must be chosen carefully to take into account the natural clustering present for all types of galaxies, even in non-overdense regions.

In order to quantify the number of galaxies that we expect in the MUSE FOV, we use the two-point correlation function $\xi(r)$ which, by definition, gives the excess $^1$probability $P$ to find a second galaxy in a volume $dV_2$ at a distance $r$ from a known galaxy position (Peebles 1980):

$$P(2|1) = \bar{n}(1 + \xi(r))dV_2, \qquad (1)$$

where $\bar{n}$ is the mean number density if galaxies were not clustered. The correlation function $\xi(r)$ can be approximated by a power law on large scales up to tens of Mpc:

$$\xi(r) = \left(\frac{r}{r_0}\right)^{-\gamma}, \qquad (2)$$

where the slope $\gamma$ is estimated to be $\gamma \approx 1.8$ (Marulli et al. 2013) and $r_0$ is the correlation length. The latter is directly related to the mass of the halo considered (e.g. Mo & White 2002), and a large body of literature have measured $r_0$ for a variety of galaxies and redshifts. For instance, according to Cochrane et al. (2018), for star-forming

galaxies at $z \approx 1$ (similar to our survey), the $r_0$ value corresponding to haloes of mass $M_h = 10^{11}$ M☉ is measured to be $r_0 \approx 3$ Mpc. On the other hand, for groups with haloes of mass $M_h = 10^{13}$ M☉, $r_0$ is approximately 7 Mpc.

Using equations (1) and (2), we can then compute how many galaxies above a given mass $M$ we can expect to find in a cylinder of radius $R$ and in a redshift interval $\pm \Delta z$ around the redshift $z_0$ of a halo (this redshift interval corresponds to a distance $R_z = c\Delta z/(1+z)H(z)$) along the LOS). For that we integrate the correlation function $\xi(r)$ over the cylinder:

$$P(r_{\perp} < R; |r_z| < R_z) = \int_{0}^{R} \int_{-R_z}^{+R_z} 2\pi r_{\perp} \left[ 1 + \left( \frac{\sqrt{r_{\perp}^2 + r_z^2}}{r_0} \right)^{-\gamma} \right] dr_{\perp} dr_z. \qquad (3)$$

The number of expected galaxies above a given mass in such a cylinder is then $P(r_{\perp} < R; |r_z| < R_z)$ times $n(M)$, the number density of haloes of mass greater than $M$ (here we use Tinker et al. 2008).

If we assume that an Mg II absorption system is associated with a halo of mass $\sim 10^{11}$ M☉ (here we do not consider an overdense region), then we can estimate the number of galaxies that we can expect around it in the MUSE FOV. For that we can take $R$ such that the cylinder has the same area on the sky as the MUSE FOV $\approx 3600$ arcsec$^2$ ($R \approx 280$ kpc at $z=1$) and $\Delta z$ corresponding to a velocity difference of 500 km s$^{-1}$.

Adelberger et al. (2003) computed analytically the integrals in equation (3) (their equation C2). Using their result we find that $3.3 \pm 3.1$ galaxies are expected in the MUSE FOV around an absorber in a region of mean density. It corresponds to an excess density of 14 compared to a pure random situation. The number of galaxies expected around an absorption system is presented in Table 1. We compare these values with Fig. 1 that shows the observed distribution of the number of galaxies within $\pm 500$ km s$^{-1}$ around each absorption system located at 0.3 < *z* < 1.5 in MEGAFLOW. We find on average $3.2 \pm 3.0$ galaxies per absorption system in the FOV which is consistent with the expected number computed above. We also observe that it is common to have up to four galaxies around an absorption system, but the histogram then falls at five galaxies due to the MUSE FOV. Thus we consider that this value defines overdensities (i.e. not consistent with the correlation function within the MUSE FOV). In this work, we aim to study the cool gas in overdense environment so we select groups made of at least five galaxies.

One can also calculate the number of groups with halo mass above a given value $M_h$ that we expect to find in MEGAFLOW. For that we multiply the volume of the survey by $n(M_h)$. We obtain that $8.1 \pm 2.8$ haloes of mass $M_h > 10^{13}$ M☉ are expected in MEGAFLOW. With the group finding method described below, we find six groups with $M_h > 10^{13}$ M☉ which is consistent with this estimation.

## 3.2 Method

To obtain a robust group sample, we proceed in two steps similarly to what is proposed in Rodriguez & Merchan (2020). First, we perform a classic friends of friends (FoF) algorithm in order to pre-select all the galaxies potentially belonging to groups. Second we refine the groups using an iterative method inspired by the halo occupation method described in Yang et al. (2005, see details below).

For the first step, we use a standard FoF algorithm with the linking lengths $\Delta D = 450$ kpc and $\Delta V = 500$ km s$^{-1}$ as recommended by Knobel et al. (2009) to optimize completeness and purity for the detection of groups of more than five galaxies. These values are in the high range of what can be found in the literature and we use them

<footnote>$^1$The excess is relative to a hypothetical sample of unclustered galaxies, that is, distributed uniformly with $\xi(r) = 0$.</footnote>
<table><caption>**Table 2.** Summary of the groups of more than five galaxies identified in MEGAFLOW. The left column presents the whole sample. The right column presents the sample selected to study counterpart Mg II absorptions.</caption><thead><tr><th></th><th>All groups</th><th>Selected groups</th></tr></thead><tbody><tr><td>Number of groups</td><td>33</td><td>26</td></tr><tr><td>Groups with Mg II absorption</td><td>22</td><td>21</td></tr><tr><td>log(M<sub>vir</sub>) range</td><td>10.7–13.7 M<sub>☉</sub></td><td>10.7–13.7 M<sub>☉</sub></td></tr><tr><td>Redshift range</td><td>0.26–3.55</td><td>0.46–1.43</td></tr><tr><td>W<sub>r</sub><sup>2796</sup> range</td><td>0.08–3.34 Å</td><td>0.08–3.34 Å</td></tr></tbody></table>

<figure><img src="image_6.png" /><figcaption>**Figure 2.** Groups of more than five galaxies observed in each quasar field as a function of redshift. The groups are represented by the blue circles. The quasars are represented by the red stars. The detected Mg II absorption systems are marked by the red vertical ticks. The blue vertical dotted lines indicate the [O II] detection limits for MUSE. The green vertical dotted lines indicate the Mg II detection limits for UVES. Two groups are present at similar redshift (≈ 0.61) in field J0800p1849 and cannot be distinguished on the figure.</figcaption></figure>

in order not to miss any galaxy that would belong to a group. With this FoF process, 38 groups of five or more galaxies are identified in the 22 fields of the MEGAFLOW sample.

As expected, some galaxies of the groups obtained with the simple FoF algorithm are suspected to be not gravitationally bound. Indeed, in some cases, phase-space diagrams reveal groups spread over redshift ranges corresponding to velocity differences up to 1500 km s⁻¹ with some galaxies clearly standing out.

In order to remove the outlying galaxies, we use a process based on the halo occupation method described in Yang et al. (2005) and later in Tinker (2021). This process is based on the assumption, coming

<figure><img src="image_7.png" /><figcaption>**Figure 3.** Number of galaxies visible in the MUSE FOV as a function of the estimated halo masses for the 26 selected groups of more than five galaxies identified in MEGAFLOW. The redshift of the groups is colour coded.</figcaption></figure>

from both numerical simulations (Jung et al. 2022) and observations (Yang, Mo & van den Bosch 2009), that groups are usually formed in massive DM haloes often containing a massive central galaxy. The idea is then to identify the most massive galaxies as potential group centres (defined as the centre of mass of the DM halo in which the group is embedded) and to compute the corresponding DM haloes properties (virial mass, virial radius and virial velocity) from their stellar masses using halo mass–stellar mass relation (Girelli et al. 2020) and concentration–mass (Correa et al. 2015) relation. The nearby galaxies located in the DM haloes are then considered as satellite galaxies. Based on this idea, the following algorithm is performed to refine each group previously found by the FoF method:

(i) If the galaxy with the highest $M_*$ has a mass larger than 1.5 times the mass of the second most massive in the group then we define it as the group centre (hence the centre of the halo). Otherwise we consider that there is no clear ‘central galaxy’ and we define the centre as the group barycentre weighted by the estimated $M_*$.

(ii) The group halo mass is estimated from the stellar mass of the most massive galaxy using the halo mass–stellar mass relation from Girelli et al. (2020).

(iii) The probability $P_{\text{sat}}$ to belong to the group is then estimated for each galaxy (see equation 4).

(iv) The four galaxies with the highest $P_{\text{sat}}$ values are candidate members of the group.

(v) The halo mass of the group is recomputed from the velocity dispersion of these five galaxies (see equation 9 below).

(vi) With the new halo mass, the $P_{\text{sat}}$ values are recomputed for the candidate galaxies. They are kept if $P_{\text{sat}} > 0.5$.

(vii) The group halo mass is updated and the $P_{\text{sat}}$ values are recomputed for the remaining galaxies. The galaxy with the highest $P_{\text{sat}}$ value is added to the group if this value is above 0.5.

(viii) We repeat the process from step (vii) to add galaxies one by one until no remaining galaxy has a $P_{\text{sat}}$ value above 0.5.

The probability $P_{\text{sat}}$ to belong to the group is computed based on the DM halo properties following Yang et al. (2005). In practice, the probability $P_{\text{sat}}$ to belong to the halo is computed as:

$$P_{\text{sat}} = 1 - (1 + P_{\text{proj}} P_z / B_{\text{sat}})^{-1}, \quad (4)$$

where $B_{\text{sat}}$ is the sensitivity parameter that would determine how far from the centre of the halo we can go. Here, we use $B_{\text{sat}} \approx 10$ which is the value recommended by Yang et al. (2005). $P_{\text{proj}}$ and $P_z$ are the pseudo-probabilities corresponding to the projected and the LOS directions, respectively.
<table><caption>**Table 3.** Characteristics of the groups of more than five galaxies identified in the MEGAFLOW sample. The groups are sorted by number of galaxy members identified.</caption><thead><tr><th>ID<br>(1)</th><th>Field id<br>(2)</th><th>N<sub>gr</sub><br>(3)</th><th>z<br>(4)</th><th>RA<br>(5)</th><th>Dec.<br>(6)</th><th>log<sub>10</sub> (M<sub>vir</sub>/M<sub>☉</sub>)<br>(7)</th><th>R<sub>vir</sub><br>(8)</th><th>W<sup>2796</sup><sub>r</sub><br>(9)</th><th>b<sub>centre</sub>/R<sub>vir</sub><br>(10)</th><th>b<sub>min</sub><br>(11)</th></tr></thead><tbody><tr><td>1</td><td>J1039p0714</td><td>21</td><td>0.99</td><td>10<sup>h</sup>39<sup>m</sup>38<sup>s</sup></td><td>+07°14′48″</td><td>12.9</td><td>309</td><td>0.63</td><td>0.96 ± 0.10</td><td>46</td></tr><tr><td>2</td><td>J0145p1056</td><td>21</td><td>0.94</td><td>01<sup>h</sup>45<sup>m</sup>13<sup>s</sup></td><td>+10°56′18″</td><td>13.2</td><td>400</td><td>0.12<sup>1</sup></td><td>0.21 ± 0.02</td><td>1</td></tr><tr><td>3</td><td>J0014m0028</td><td>13</td><td>0.83</td><td>00<sup>h</sup>14<sup>m</sup>51<sup>s</sup></td><td>-00°28′33″</td><td>13.7</td><td>631</td><td>2.09</td><td>0.35 ± 0.05</td><td>8</td></tr><tr><td>4</td><td>J1107p1021</td><td>11</td><td>0.75</td><td>11<sup>h</sup>07<sup>m</sup>42<sup>s</sup></td><td>+10°21′27″</td><td>11.9</td><td>161</td><td>2.34</td><td>0.13 ± 0.11</td><td>37</td></tr><tr><td>5</td><td>J1107p1021</td><td>10</td><td>0.90</td><td>11<sup>h</sup>07<sup>m</sup>40<sup>s</sup></td><td>+10°21′15″</td><td>12.2</td><td>191</td><td>&lt;0.05</td><td>1.38 ± 0.21</td><td>93</td></tr><tr><td>6</td><td>J0058p0111</td><td>9</td><td>0.64</td><td>00<sup>h</sup>58<sup>m</sup>56<sup>s</sup></td><td>+01°11′28″</td><td>12.4</td><td>247</td><td>3.34</td><td>0.17 ± 0.04</td><td>6</td></tr><tr><td>7</td><td>J1352p0614</td><td>8</td><td>0.61</td><td>13<sup>h</sup>52<sup>m</sup>17<sup>s</sup></td><td>+06°14′18″</td><td>13.0</td><td>411</td><td>0.78</td><td>0.27 ± 0.05</td><td>10</td></tr><tr><td>8</td><td>J1236p0725</td><td>7</td><td>1.33</td><td>12<sup>h</sup>36<sup>m</sup>23<sup>s</sup></td><td>+07°25′34″</td><td>12.5</td><td>193</td><td>0.41</td><td>1.04 ± 0.20</td><td>113</td></tr><tr><td>9</td><td>J1358p1145</td><td>7</td><td>1.10</td><td>13<sup>h</sup>58<sup>m</sup>07<sup>s</sup></td><td>+11°46′21″</td><td>12.3</td><td>186</td><td>&lt;0.05</td><td>1.55 ± 0.32</td><td>253</td></tr><tr><td>10</td><td>J1358p1145</td><td>7</td><td>1.15</td><td>13<sup>h</sup>58<sup>m</sup>07<sup>s</sup></td><td>+11°45′36″</td><td>13.1</td><td>303</td><td><sup>a</sup></td><td>0.93 ± 0.17</td><td>1</td></tr><tr><td>11</td><td>J0015m0751</td><td>7</td><td>0.87</td><td>00<sup>h</sup>15<sup>m</sup>34<sup>s</sup></td><td>-07°51′10″</td><td>12.0</td><td>170</td><td><sup>a</sup></td><td>0.57 ± 0.11</td><td>1</td></tr><tr><td>12</td><td>J1509p1506</td><td>7</td><td>0.97</td><td>15<sup>h</sup>08<sup>m</sup>59<sup>s</sup></td><td>+15°06′48″</td><td>12.7</td><td>275</td><td>1.30</td><td>0.43 ± 0.08</td><td>80</td></tr><tr><td>13</td><td>J2152p0625</td><td>7</td><td>1.43</td><td>21<sup>h</sup>52<sup>m</sup>01<sup>s</sup></td><td>+06°25′19″</td><td>13.1</td><td>310</td><td>1.15</td><td>0.35 ± 0.09</td><td>61</td></tr><tr><td>14</td><td>J2137p0012</td><td>6</td><td>1.21</td><td>21<sup>h</sup>37<sup>m</sup>48<sup>s</sup></td><td>+00°12′36″</td><td>12.6</td><td>224</td><td>1.13</td><td>0.63 ± 0.13</td><td>95</td></tr><tr><td>15</td><td>J1352p0614</td><td>6</td><td>1.14</td><td>13<sup>h</sup>52<sup>m</sup>18<sup>s</sup></td><td>+06°14′20″</td><td>12.6</td><td>242</td><td>1.40</td><td>0.49 ± 0.14</td><td>27</td></tr><tr><td>16</td><td>J0838p0257</td><td>6</td><td>0.94</td><td>08<sup>h</sup>38<sup>m</sup>51<sup>s</sup></td><td>+02°57′10″</td><td>11.8</td><td>141</td><td>0.77</td><td>0.47 ± 0.36</td><td>64</td></tr><tr><td>17</td><td>J1425p1209</td><td>6</td><td>0.26</td><td>14<sup>h</sup>25<sup>m</sup>38<sup>s</sup></td><td>+12°09′16″</td><td>12.4</td><td>309</td><td><sup>b</sup></td><td>0.07 ± 0.01</td><td>10</td></tr><tr><td>18</td><td>J0131p1303</td><td>6</td><td>0.84</td><td>01<sup>h</sup>31<sup>m</sup>36<sup>s</sup></td><td>+13°03′38″</td><td>12.7</td><td>294</td><td>0.14</td><td>0.18 ± 0.1</td><td>96</td></tr><tr><td>19</td><td>J2137p0012</td><td>5</td><td>1.04</td><td>21<sup>h</sup>37<sup>m</sup>47<sup>s</sup></td><td>+00°12′07″</td><td>13.3</td><td>426</td><td>0.87</td><td>0.38 ± 0.09</td><td>84</td></tr><tr><td>20</td><td>J1314p0657</td><td>5</td><td>0.99</td><td>13<sup>h</sup>14<sup>m</sup>06<sup>s</sup></td><td>+06°57′24″</td><td>11.1</td><td>81</td><td>0.91</td><td>0.46 ± 0.25</td><td>38</td></tr><tr><td>21</td><td>J0015m0751</td><td>5</td><td>0.63</td><td>00<sup>h</sup>15<sup>m</sup>36<sup>s</sup></td><td>-07°50′47″</td><td>12.9</td><td>338</td><td><sup>b</sup></td><td>0.44 ± 0.1</td><td>116</td></tr><tr><td>22</td><td>J0800p1849</td><td>5</td><td>0.61</td><td>08<sup>h</sup>00<sup>m</sup>05<sup>s</sup></td><td>+18°49′21″</td><td>12.7</td><td>328</td><td>1.02</td><td>0.40 ± 0.09</td><td>67</td></tr><tr><td>23</td><td>J0014m0028</td><td>5</td><td>1.36</td><td>00<sup>h</sup>14<sup>m</sup>53<sup>s</sup></td><td>-00°28′42″</td><td>12.3</td><td>171</td><td>&lt;0.04</td><td>0.77 ± 0.17</td><td>131</td></tr><tr><td>24</td><td>J1107p1021</td><td>5</td><td>1.30</td><td>11<sup>h</sup>07<sup>m</sup>43<sup>s</sup></td><td>+10°21′35″</td><td>12.0</td><td>137</td><td>0.53</td><td>0.68 ± 0.19</td><td>58</td></tr><tr><td>25</td><td>J0131p1303</td><td>5</td><td>1.34</td><td>01<sup>h</sup>31<sup>m</sup>35<sup>s</sup></td><td>+13°03′21″</td><td>12.2</td><td>157</td><td>0.17</td><td>1.99 ± 0.45</td><td>127</td></tr><tr><td>26</td><td>J0838p0257</td><td>5</td><td>0.82</td><td>08<sup>h</sup>38<sup>m</sup>51<sup>s</sup></td><td>+02°56′51″</td><td>11.8</td><td>147</td><td>0.28</td><td>1.05 ± 0.24</td><td>142</td></tr><tr><td>27</td><td>J2137p0012</td><td>5</td><td>0.81</td><td>21<sup>h</sup>37<sup>m</sup>49<sup>s</sup></td><td>+00°12′25″</td><td>11.8</td><td>152</td><td>0.80</td><td>0.59 ± 0.13</td><td>72</td></tr><tr><td>28</td><td>J0014p0912</td><td>5</td><td>1.22</td><td>00<sup>h</sup>14<sup>m</sup>52<sup>s</sup></td><td>+09°12′06″</td><td>11.6</td><td>103</td><td>1.43</td><td>1.59 ± 1.36</td><td>99</td></tr><tr><td>29</td><td>J0800p1849</td><td>5</td><td>0.60</td><td>08<sup>h</sup>00<sup>m</sup>03<sup>s</sup></td><td>+18°49′20″</td><td>11.9</td><td>173</td><td>0.08</td><td>0.85 ± 0.21</td><td>85</td></tr><tr><td>30</td><td>J0015m0751</td><td>5</td><td>0.46</td><td>00<sup>h</sup>15<sup>m</sup>36<sup>s</sup></td><td>-07°50′36″</td><td>10.7</td><td>76</td><td>&lt;0.07</td><td>2.35 ± 0.53</td><td>167</td></tr><tr><td>31</td><td>J1107p1021</td><td>5</td><td>3.55</td><td>11<sup>h</sup>07<sup>m</sup>43<sup>s</sup></td><td>+10°21′31″</td><td>12.8</td><td>136</td><td><sup>a, b</sup></td><td>0.80 ± 0.18</td><td>101</td></tr><tr><td>32</td><td>J0015m0751</td><td>5</td><td>0.53</td><td>00<sup>h</sup>15<sup>m</sup>37<sup>s</sup></td><td>-07°51′18″</td><td>12.6</td><td>312</td><td>&lt;0.07</td><td>0.67 ± 0.15</td><td>122</td></tr><tr><td>33</td><td>J0014m0028</td><td>5</td><td>1.40</td><td>00<sup>h</sup>14<sup>m</sup>52<sup>s</sup></td><td>-00°28′09″</td><td>12.9</td><td>258</td><td>0.09<sup>b</sup></td><td>0.74 ± 0.17</td><td>84</td></tr></tbody></table>

Notes.ª Group redshift equal or greater than the redshift of the quasar. ᵇNo or bad UVES coverage. The columns present the group id (1), the quasar field (2), the number of members (3), the redshift (4), the angular coordinates (5 and 6), the estimated virial mass (7), the estimated virial radius in kpc (8), the Mg II absorption rest-frame equivalent width in Å (9), the impact parameter relative to the centre of the group normalized by the virial radius (10), and the impact parameter relative to the closest galaxy in kpc (11).

<figure><img src="image_8.png" /><figcaption>**Figure 4.** Superposed phase diagram of the 26 selected groups of more than five galaxies. For all the groups the galaxies are plotted in the group centre rest frame. The projected distance to the centre of the group is normalized by the virial radius and the velocity difference to the centre of the group is normalized by the virial velocity. The grey open circles are the nearby galaxies rejected by the algorithm. The black lines are the escape velocity caustics computed from the estimated mass of the groups assuming NFW properties.</figcaption></figure>

$P_{\text{proj}}$ at a given projected distance $R_p$ from the centre of the halo is given by:

$$P_{\text{proj}}(R_p) = 2r_s \bar{\delta} f(R_p / r_s), \quad (5)$$

where $f$ is a function defined as:

$$f(x) = \begin{cases} \frac{1}{x^2 - 1} \left( 1 - \frac{\ln \frac{1 + \sqrt{1 - x^2}}{x}}{\sqrt{1 - x^2}} \right) & \text{if } x < 1 \\ \frac{1}{3} & \text{if } x = 1 \\ \frac{1}{x^2 - 1} \left( 1 - \frac{\arctan \sqrt{x^2 - 1}}{\sqrt{x^2 - 1}} \right) & \text{if } x > 1, \end{cases} \quad (6)$$

and where $\bar{\delta}$ is the overdensity corresponding to an isotropic Navarro–Frenk–White (NFW, see Navarro, Frenk & White 1997) DM profile defined as:

$$\rho_{\text{NFW}} = \frac{\bar{\rho}\bar{\delta}}{\frac{r}{r_s}\left(1 + \frac{r}{r_s}\right)^2}, \quad (7)$$

where $r_s$ is the characteristic scale parameter and $\bar{\rho}$ is the mean density of the universe.
<figure><img src="image_9.png" /><figcaption>**Figure 5.** Top: Mg II absorption rest equivalent width versus impact parameter *b* to the closest galaxy and bottom: to the group centre normalized by the virial radius. The halo mass of the groups is colour coded. The groups for which no Mg II counterpart absorption system have been detected are represented by downward arrows and plotted at the detection limit. The represented error bars are $1\sigma$. The grey dashed line is the best fit of the form $\log_{10}(W_r^{2796}) = A \times b + B$ and the shaded area is the corresponding $1\sigma$ uncertainty.</figcaption></figure>

$P_z$ at a given redshift separation $\Delta z$ from the centre is given by:

$$P_z(\Delta z) = \frac{c}{\sqrt{2\pi}\sigma_v} \exp\left[-\frac{\Delta v^2}{2\sigma_v^2}\right], \qquad (8)$$

where *c* is the speed of light, $\Delta v = c\Delta z/(1+z)$ is the velocity relative to the centre, and $\sigma_v$ is the velocity dispersion of the galaxies within the group, assumed to be $\sigma_v = V_{vir}/\sqrt{2}$ with $V_{vir} = (GM_{vir}/R_{vir})^{1/2}$.

The masses of the groups derived at step (vii) are estimated from the velocity dispersion of their members and their spatial extent. Indeed, under the assumption that a group is virialized, its mass can be related to the velocity dispersion of its galaxies along the line of sight $\sigma_{los}$ and its radius $R_{group}$:

$$M_{vir} = \frac{AR_{group}\sigma_{los}^2}{G}, \qquad (9)$$

where $R_{group}$ is estimated by taking the dispersion of the projected distance of the galaxies. The factor *A* must be taken such that the mass estimator is unbiased. Calibration tests using groups from TNG50 lead to a choice of *A* = 5.0 which is also the value recommended by Eke et al. (2004).

The virial radius of the groups are derived from their virial masses:

$$R_{vir} = \left( \frac{3M_{vir}}{4\pi \Delta_{vir} \rho_c(z)} \right)^{1/3}, \qquad (10)$$

where $\rho_c(z)$ is the critical density of the universe at redshift *z* and $\Delta_{vir} = 18\pi^2 + 82x - 39x^2$ with $x = \Omega_M(z) - 1$ applicable for a flat universe with $\Omega_k = 0$ (Bryan & Norman 1998).

The main sources of error in our estimation of $M_{vir}$ are the estimation of the velocity dispersion $\sigma_{los}$ and the estimation of the projected distance dispersion $R_{group}$. Under the assumption of a normal distribution, the $1\sigma$ uncertainty associated to an unbiased standard deviation estimator of value *x* on a sample of size *N* is equal to $x\sqrt{1-k^2(N)}$ (see Markowitz 1968), where $k(N)$ is given by:

$$k(N) = \sqrt{\frac{2}{N-1} \frac{\Gamma(N/2)}{\Gamma((N-1)/2)}} \qquad (11)$$

with $\Gamma$ the gamma function. The above equation is used to estimate the uncertainty of the velocity dispersion and the projected distance dispersion. As a consequence, the error on $M_{vir}$ logically increases when the number of galaxies decreases. With fewer than five galaxies, the error on the virial radius is above 30 per cent. For this reason and the one explained in Section 3.1, we focus on groups of five galaxies or more in the rest of the analysis. The uncertainties on the virial mass are propagated to the virial radius.

One of the main limitation of the method presented here is that groups can be truncated by the MUSE FOV. In such case the centre of the group could be wrong and the group members badly identified. This effect is an additional source of error that we did not take into account in this work.

### 3.3 The group sample

From the 38 groups of more than five galaxies detected by the FoF algorithm, we finally obtain 33 groups after the refinement process. One of them is at high redshift ($z = 3.55$), the others are in the range $0.3 < z < 1.5$. We find six groups with an estimated halo mass above $10^{13} M_{\odot}$, which is in line with the expected number estimated in Section 3.1.

Among the 33 groups, three have the same redshift as the quasar of the field (note that among our 22 quasars, only five of them are located at redshifts below 1.5 where our groups are preferentially detected using the [O II] emission lines). We remove these three groups from the analysis because Mg II absorption could be affected by the position of the quasar among the group and by the galaxy hosting the quasar (one of these groups is associated with an absorption). Another group is removed because it is located at a redshift higher than the redshift of the quasar. Three other groups located at redshift where there is no UVES coverage on Mg II are removed from the analysis. In total seven groups are removed and we finally obtain a sample of 26 groups that we use as a basis to study Mg II absorption in the quasars spectra. These groups have $\log_{10}(M_{vir}/M_{\odot})$ ranging from 10.7 to 13.7 with a median value of 12.3 and with redshifts ranging from 0.5 to 1.4 with a median value of 1.0. 16 out of the 26 groups have a central galaxy as defined at step (i). The centres of the other 10 groups are the barycentres weighted by the stellar masses of the galaxies.

The group sample is presented in Table 2 and Fig. 2. The individual groups are detailed in Table 3 and shown in Fig. A1. The number of galaxies per group as a function of their mass and redshift is shown in Fig. 3.

We can also represent each group in a phase-space diagram, where each galaxy is positioned according to its projected distance and its velocity difference relative to the centre of the group. The superposition of the 26 phase-space diagrams is shown in Fig. 4. We see that group members are found up to twice the virial speed and projected distances up to twice the virial radius of the groups.
### 3.3.1 Estimation of the SFR

We estimate the SFR of the group members using the dust corrected relation from Gilbank et al. (2010) based on the [O II] flux and the estimated stellar mass:

$$ \text{SFR} = \frac{L([\text{OII}]_{\text{obs}})/3.8 \times 10^{40} \text{erg s}^{-1}}{a \tanh[(x - b)/c] + d} \quad (12) $$

with $a = -1.424$, $b = 9.827$, $c = 0.572$, $d = 1.70$, and $x = \log(M^*)$. For 12 groups out of 33, the centre corresponds to a galaxy that can be described as 'passive' with a specific SFR (sSFR) below $0.1 \text{ Gyr}^{-1}$. For five additional groups, the centre is within 50 projected kpc from a passive galaxy. This tendency to have quenched central galaxies due to interactions or merger events is well known (Tal et al. 2014; Smethurst et al. 2017), and tends to confirm our group centre identification. The passive galaxies are indicated in red in Fig. A1.

## 4 MG II ABSORPTION VERSUS IMPACT PARAMETER

Now that the groups have been identified in the MEGAFLOW sample, we want to study the cool gas around them by looking at Mg II absorption seen in nearby quasars spectra obtained with UVES. For that we consider that a group is related to an Mg II absorption system if the redshift difference relative to the group centre is $\Delta V < 1000 \text{ km s}^{-1}$. The choice of $\Delta V$ is not crucial for the analysis as long as it is large enough to capture any potential absorption in the neighbourhood of the group. For our sample, the group-absorption association remains identical for $\Delta V$ ranging from 400 to 6000 km s$^{-1}$.

Out of the 26 selected groups, 21 can be paired with an Mg II absorption system (nine having $W_r^{2796} > 1 \AA$) and five cannot be paired with any absorption system. To quantify the profile of Mg II haloes around groups of galaxies, we want to study how $W_r^{2796}$ varies with the impact parameter to the LOS. However, for groups of galaxies, the notion of impact parameter is ambiguous. Bordoloi et al. (2011) consider the impact parameter relative to the geometric group centre defined as the geometric mean of the positions of the group members, or to the most massive galaxy; Nielsen et al. (2018) consider the impact parameter relative to the closest galaxy or to the most luminous galaxy and Dutta et al. (2020) consider the impact parameter relative to the geometric group centre, in some cases normalized by the virial radius.

We can see in Fig. A1 that those different definitions are not necessarily in agreement. With our approach, the groups are assumed to lie in DM haloes often containing a massive central galaxy. In consequence, we focus on two definitions of the impact parameter: $b_{\min}$, the projected distance to the closest galaxy and $b_{\text{centre}}$, the projected distance to the group centre. Even if these two definitions are correlated, they enable us to investigate whether absorption systems are more likely affected by the CGM of individual galaxies located close to the LOS or by the presence of an intragroup medium centred on the DM halo.

Intuitively, one would expect the size of the cool gas halo to be correlated with the size of the DM halo of the group (and hence with its mass). For that reason, we normalize $b_{\text{centre}}$ by the virial radius of the group. We do not normalize $b_{\min}$ by the virial radius of the closest galaxy because it would require to estimate the galaxy halo mass using the $M^* - M_{\text{halo}}$ relation. However, the stellar mass estimate

from SED fitting could be uncertain in some cases and the $M^* - M_{\text{halo}}$ relation has an important scatter.

$W_r^{2796}$ as a function of $b_{\min}$ and of $b_{\text{centre}}/R_{\text{vir}}$ is shown in Fig. 5. The uncertainties on $b_{\min}$ are very small because they only consist in the precision with which the centre of the quasar and the centre of the closest galaxy could be determined. The uncertainties on $b_{\text{centre}}$ are similar but for the groups with no central galaxy identified in step (i), they also include the propagation of the stellar mass uncertainties on the barycentre of the group. The uncertainties on $R_{\text{vir}}$ are computed by propagating the uncertainties on $M_{\text{vir}}$ described in Section 3.2 using equation (10). Fig. 5 clearly shows a scattered anticorrelation between $W_r^{2796}$ and impact parameter for both definitions. $W_r^{2796}$ seems to drop at $\approx 150 \text{ kpc}$ from the closest galaxy or at the virial radius from the group centre. The dispersion for the second case appears to be small even if some groups like the groups 7, 18, and 28 are standing outside of the main trend (see the discussion in Section 7 for these cases).

To better characterize this decrease of $W_r^{2796}$ with the impact parameter, we fit it with a log-linear relation of the form:

$$ \log W_r^{2796} = a + m \times b. \quad (13) $$

As shown in Fig. 5, some groups with low $W_r^{2796}$ are affected by significant vertical uncertainties due to Mg II absorption measurement meanwhile some groups are presenting high horizontal uncertainties when we consider $b_{\text{centre}}/R_{\text{vir}}$. These are mostly due to poor group centre or group mass estimation. To take into account the uncertainties along the two axis, we use the results from Hogg, Bovy & Lang (2010) that define the angle $\theta = \arctan(m)$ and the vector orthogonal to the linear relation $\hat{v}^{\text{T}} = [-\sin\theta \cos\theta]$. A measurement $i$ of a given Mg II equivalent width $W_{ri}^{2796}$ (hereafter we note $W_i \doteq \log W_{ri}^{2796}$) at a given impact parameter $b_i$ can be defined by the vector $Z_i$ and the associated covariance matrix $S_i$:

$$ Z_i = \begin{bmatrix} b_i \\ W_i \end{bmatrix}, \quad S_i = \begin{bmatrix} \sigma_{b_i}^2 & 0 \\ 0 & \sigma_{W_i}^2 \end{bmatrix}. \quad (14) $$

The likelihood of such measurement can then be expressed as a function of the orthogonal displacement $\Delta_i = \hat{v}^{\text{T}}Z_i - a \cos\theta$ and of the projected covariance matrix $\Sigma_i = \hat{v}^{\text{T}}S_i\hat{v}$. Finally, the total likelihood can be expressed as:

$$ \mathcal{L}(W) = K \left[ \prod_{i=1}^{n} \exp \left( \frac{\Delta_i (W_i)^2}{2 \Sigma_i^2} \right) \right] \times \left[ \prod_{i=1}^{m} \int_{-\infty}^{W_i} dW' \exp \left( \frac{\Delta_i (W')^2}{2 \Sigma_i^2} \right) \right], \quad (15) $$

where $K$ is a constant. The first product corresponds to the likelihood of the points that have detected Mg II absorption and the second products corresponds to the likelihood of the points that do not have Mg II absorption detected but only have an upper limit on $W_i$.

For this fit, we consider that $\sigma_{W_i}$ can be decomposed into two subterms: a measurement uncertainty $\sigma_{m_i}$ and an intrinsic scatter $\sigma_c$ due to the natural variations from group to group. In consequence, we express $\sigma_{W_i}$ as the quadratic sum of these two components:

$$ \sigma_{W_i}^2 = \sigma_{m_i}^2 + \sigma_c^2. \quad (16) $$

The intrinsic scatter $\sigma_c$ is estimated following Chen et al. (2010) by comparing the deviation to the maximum-likelihood solution to the measurement uncertainty:

$$ \sigma_c = \text{med} \left( \left[ W_i - \bar{W}(b_i) - \frac{1}{N} \sum_{j=1}^{N} (W_i - \bar{W}(b_j)) \right]^2 - \sigma_{m_i}^2 \right). \quad (17) $$
As the above equation depends on the likelihood solution, we iterate starting with $\sigma_c = 0$ until we reach convergence.

Finally, when we consider the impact parameter $b_{min}$, the intrinsic scatter converges to $\sigma_c = 0.42$ dex and the best-fitting parameter values are $a = 1.14 \pm 0.005$ and $m = -0.017 \pm 0.001$.

When we consider the impact parameter relative to the centre of the group and normalized by the virial radius, the intrinsic scatter converges to $\sigma_c = 0.81$ dex, and the best-fitting parameter values are $a = 1.75 \pm 0.42$ and $m = -3.90 \pm 0.58$. For this model, $W_r^{2796}$ drops below $0.1$ Å for an impact parameter of $1.03 \times R_{vir}$. The fitted models are shown along with the measured data in Fig. 5.

## 5 H I AND DM COLUMN DENSITIES

In the previous section, we have seen that the Mg II absorption profile seems to scale with the halo mass which is consistent with the isotherm model from Tinker et al. (2008). If we assume that $W_r^{2796}$ is proportional to the amount of cool gas along the LOS as suggested by the works of Rao, Turnshek & Nestor (2006) and Ménard & Chelouche (2009), it implies that the cool gas halo scales with the DM halo. Based on that idea, we aim to compare the column density profile for these two components.

To estimate the DM column density profile we use the results from Diemer (2023). Instead of using a standard NFW profile (Navarro et al. 1997) which is not physical at high radii, they propose a functional form designed to take into account both orbiting and first in-falling DM particles as well as the asymptotic behaviour at large radii where the profile reaches the mean density of the universe. They finally suggest a form similar to a truncated Einasto profile. We use the COLOSSUS package (Diemer 2018) that implements this DM profile to compute the corresponding DM column density profile along the LOS. For the comparison with our sample we consider a halo of mass $10^{12}$ M$_{\odot}$ at $z = 1$ (the median halo mass and redshift for our group sample are, respectively, $10^{12.3}$ M$_{\odot}$ and $z = 1.0$).

We then estimate the H I column density from our Mg II absorption measurement using the results from Lan & Fukugita (2017). They fit the correlation between Mg II absorption strength and H I column density on a sample of Mg II absorptions from several catalogues with redshift $0.1 < z < 4.5$ for which H I column densities have been measured using H I absorption lines. They finally obtain the following relation:

$$N_{\text{HI}} = A \left( \frac{W^{2796}}{1\AA} \right)^{\alpha} (1+z)^{\beta}, \quad (18)$$

with $\alpha = 1.69 \pm 0.13$, $\beta = 1.88 \pm 0.29$, and $A = 10^{18.96 \pm 0.10} \text{ cm}^{-2}$.

We use this model to estimate the H I column density in our groups and we propagate the uncertainties from the relation from Lan & Fukugita (2017). We find H I column densities of approximately $10^{19}–10^{20} \text{ cm}^{-2}$ for the groups where we have Mg II absorption detected. Our detection limit of $\approx 0.1$ Å corresponds to an H I column density of approximately $2 \times 10^{17} \text{ cm}^{-2}$. We fit the H I column density profile with the method applied in Section 4 on Mg II. For H I, we obtain the following parameters: $a = -14.0 \pm 0.3$ and $m = -6.6 \pm 0.2$. Fig. 6 shows the DM column density profile along with the H I best fit and the H I column densities for each group. As we can see the H I and DM profiles present a very similar shape with a clear drop at the virial radius.

## 6 COVERING FRACTION

To further characterize the Mg II absorption, the covering fraction is derived for the 26 selected groups of more than five galaxies. The

<figure><img src="image_10.png" /><figcaption>**Figure 6.** Dots with right axis: H I column density derived from $W_r^{2796}$ based on Lan & Fukugita (2017) for the 26 selected groups of more than five galaxies. The represented error bars are $1\sigma$ uncertainties. The blue dotted line is the best fit of the form $\log_{10}(\Sigma_{\text{HI}}) = A \times b + B$. Red dashed line with left axis: projected DM column density corresponding to the DM profile from Diemer (2023) for a halo with $M = 10^{12}$ M$_{\odot}$ and $z = 1$.</figcaption></figure>

covering fraction is commonly defined as the probability $P$ of detecting an Mg II absorption system at a given impact parameter from a galaxy or a group of galaxies. Practically, several methodologies are used in the literature to compute the covering fraction. Nielsen et al. (2018) compute the covering fraction in impact parameters bins by doing the ratio of galaxies associated to an absorption by the total number of galaxies in that bin. Dutta et al. (2020) use a cumulative covering fraction. Chen et al. (2010) take into account how the gaseous halo scales with the B-band luminosity to normalize the impact parameter. Here, to be consistent with previous analysis performed on MEGAFLOW, we adopt the logistic regression method described in Schroetter et al. (2021) to compute the differential covering fraction. This Bayesian method is particularly adapted in cases where bins would not be sufficiently or evenly populated. To describe it briefly, the probability $P$ of detecting an Mg II absorption system at a given impact parameter from a group is assumed to follow a logistic function of the form:

$$P(\text{detection} = 1) \doteq L(t) = \frac{1}{1 + \exp(-t)}, \quad (19)$$

where $t$ is expressed as a function of the independent variables $X_i$ and of the model parameters $\theta$. In our case, we consider that the variable is the impact parameter $b$ and that $t$ follows a logarithmic decrease of the form:

$$t = f(X_i, \theta) = A(\log b - B). \quad (20)$$

The parameters of interest $A$ and $B$ are then fitted using a Monte Carlo Markov Chain (MCMC) algorithm based on 9000 Bernoulli trials. This fit is performed using the PYMC3 PYTHON module (Hoffman & Gelman 2011; Salvatier, Wiecki & Fonnesbeck 2016). Note that this method does not require any binning contrary to what can be found in other studies. In consequence, our input are Booleans corresponding to the presence (or not) of an absorption. In order to obtain a robust fit, two additional parameters are simultaneously fitted to take into account outliers: $f_{out}$ is the fraction of outliers in the sample and $p_{out}$ is the covering fraction associated to these outliers and assumed to be constant. The obtained best-fitting parameters are listed in Table 4.

We find that the 50 per cent covering fraction, namely $f_c(b) = 0.50$, is reached for $\log_{10}(b_{min}/\text{kpc}) = 2.17 \pm 0.47 (2\sigma)$ and $b_{centre}/R_{vir} = 1.67 \pm 0.98 (2\sigma)$. The fitted covering fractions as a function of $b_{min}$ and $b_{centre}/R_{vir}$ are plotted in Fig. 7 and are compared with the results
<table><caption>**Table 4.** Covering fraction fitted parameters for the two impact parameter definitions. The uncertainties are $2\sigma$.</caption><thead><tr><th></th><th>A</th><th>B</th><th>f<sub>out</sub></th><th>p<sub>out</sub></th></tr></thead><tbody><tr><td>b<sub>min</sub></td><td>-5.4<sup>+4.3</sup><sub>-6.9</sub></td><td>2.2<sup>+0.6</sup><sub>-0.3</sub></td><td>0.1<sup>+0.4</sup><sub>-0.1</sub></td><td>0.7<sup>+0.3</sup><sub>-0.6</sub></td></tr><tr><td>b<sub>centre</sub>/R<sub>vir</sub></td><td>-2.7<sup>+2.1</sup><sub>-6.8</sub></td><td>1.7<sup>+1.1</sup><sub>-0.9</sub></td><td>0.2<sup>+0.3</sup><sub>-0.2</sub></td><td>0.6<sup>+0.4</sup><sub>-0.6</sub></td></tr></tbody></table>

<figure><img src="image_11.png" /><figcaption>**Figure 7.** Differential covering fraction of Mg II absorption of width $W_{r}^{2796} > 0.1\AA$ for the groups of five or more galaxies. Top: as a function of $b_{min}$ and compared with the results from Schroetter et al. (2021), Dutta et al. (2020), and Nielsen et al. (2013). Bottom: as a function of $b_{centre}/R_{vir}$. Each vertical black mark corresponds to a group, it is equal to one if there is a counterpart absorption system and zero otherwise. The shaded areas correspond to the 95 per cent confidence level of the covering fraction. The error bars for Dutta et al. (2020) and Nielsen et al. (2013) correspond to the 68 per cent confidence level.</figcaption></figure>

from Schroetter et al. (2021) and Nielsen, Churchill & Kacprzak (2013).

## 7 DISCUSSION

As mentioned in Section 4, three groups deviate significantly from the main $W_{r}^{2796} - b_{centre}/R_{vir}$ decreasing trend. Fig. A1 gives us some hints on the particularities of these groups. The group 7 is below the relation. Its Mg II equivalent width is low in spite of being at small impact parameter from the LOS. This behaviour could be explained by the fact that four galaxies around the group centre are quenched. The low star formation activity in the central part of this group is synonym of low galactic winds and, hence, low amount of gas ejected from the galaxies into the CGM. The group

18 is also below the main trend. It presents an elongated shape with five out of six galaxies aligned so that they could be part of a filament. In such case, this group would not be virialized and the cool gas could then possibly be preferentially distributed along the filament. The group 28 at the contrary is above of the relation. It is a very compact group with small velocity dispersion leading to a low estimated virial mass. As it is composed of only five galaxies the uncertainty on the virial mass is large. In addition, the group has no clear heaviest galaxy, so we estimated the position of the centre as the barycentre of the group members. The position of the barycentre suffers from high uncertainties from the estimated stellar masses of the members. These combined uncertainties lead to a large error bar that could explain why this group is standing outside of the main relation.

Fig. A1 also reveals very different kinds of group morphologies. For instance groups 8, 15, 20, 27, 28, 29, and 30 are very compact both in projected and in velocity space meanwhile groups 14, 19, and 21 seem extended and diffuse. We also observe few groups with particularly elongated shapes like groups 12, 18, and 33. These groups could be part of filaments accreting toward nodes of the cosmic web.

The absorption systems also present some diversity. In many cases like for groups 1, 4, and 6, all the components seem to be mixed and form a single absorption system with large velocity dispersion. In other cases such as 13, 24, and 28, we clearly observe distinct components, that are none the less difficult to attribute to a specific member. In few cases like groups 4, 18, 19, or 22, we can possibly identify the galaxy counterpart of some absorption components. For the group 19, we can clearly attribute a specific absorption component for four out of the five members. For the group 4 we can see in the spectra an absorption component matching with the galaxy 13, lying outside of the group (and that have been rejected by the halo refinement algorithm).

We also observe that for five groups out of 26, no counterpart Mg II absorption is found in the quasar spectra. For these five cases, the estimated impact parameter to the centre is relatively large which is consistent with the picture of a halo of cool gas vanishing at high distance.

## 7.1 Comparison with field and isolated galaxies

It is interesting to compare the covering fraction computed for our group sample to the covering fraction of field galaxies. For that we use the results from Schroetter et al. (2021) that estimated the Mg II covering fraction for MEGAFLOW galaxies at redshifts $1 < z < 1.5$ where both Mg II and C IV absorptions could be observed with UVES. A total of 215 galaxies have been identified in this redshift range using their [O II] emission. When multiple galaxies were present in the vicinity of an absorption system, they considered the impact parameter relatively to the closest galaxy. For that reason, we compare their results to the covering fraction that we computed as a function of $b_{min}$ (top panel of Fig. 7). The fact that we use the same survey and the same methodology to compute the covering fraction allows a consistent comparison between our results. The overlap between our group sample and the sample used by Schroetter et al. (2021) consists of five absorption systems out of the 52 that they used to compute their covering fraction. Finally, we find that the covering fraction for groups is approximately three times larger than the one computed by Schroetter et al. (2021, the 50 per cent covering fractions are reached, respectively, at 148 kpc versus 47 kpc).
<figure><img src="image_12.png" /><figcaption>**Figure 8.** Distribution of Mg II absorption equivalent width for the 120 MEGAFLOW absorptions at $0.3 < z < 1.5$ (in blue) and for the 21 groups of more than five galaxies (in orange) presenting absorption. The distributions have been normalized to be compared.</figcaption></figure>

In terms of equivalent width, we observe that groups are not preferentially associated with strong absorptions in MEGAFLOW as shown in the $W_r^{2796}$ distribution presented in Fig. 8. Indeed, on the 59 strong absorptions with $W_r^{2796} > 1.0$ Å only nine are associated with groups of five galaxies or more. Reversely, on the six groups with an estimated virial mass above $10^{13}$ M$_\odot$ only two present an associated absorption with $W_r^{2796} > 1$ Å. Our results are in line with the works from Bouché et al. (2006) and Lundgren et al. (2009) that have shown that $W_r^{2796}$ does not grow with the mass of the halo but is rather anticorrelated with it.

We also compare our results to Dutta et al. (2020). In their section 3.5, they present the covering fraction computed for their full sample of 228 galaxies at redshift $0.8 < z < 1.5$. There are two major differences with the work from Schroetter et al. (2021). First they did not select the quasar fields based on the presence of multiple Mg II absorptions as it has been done for MEGAFLOW, arguing that it would prevent their analysis from any bias due to pre-selection. Second, their sample is mostly composed of continuum-detected galaxies (it contains only 14 galaxies that have been identified from the research of emission lines in the vicinity of known Mg II absorptions). In their fig. 18, they show the covering fraction for their whole sample. When multiple galaxies are present around an absorption system they take into account all galaxies in their calculation. Their results show that the covering fraction is significantly affected by the choice of the absorption equivalent width limit. Nevertheless, in Fig. 7, we show that their covering fraction is completely consistent with the covering fraction computed by Schroetter et al. (2021) on MEGAFLOW for an identical equivalent width limit of $0.1$ Å.

It is also interesting to compare our result to the covering fraction estimated by Nielsen et al. (2013) for isolated galaxies. They defined galaxies as isolated if they have no neighbours within a projected distance of 100 kpc and LOS velocity interval of 500 km s$^{-1}$. They used 182 isolated galaxies at redshift $0.07 < z < 1.12$ from the MAGIICAT sample which is built from a compilation of several galaxy-absorption pair samples (some of them consisting of galaxies identified around known Mg II absorption systems). They computed the covering fraction for several absorption equivalent width limits. In Fig. 7, we show their estimated covering fraction at $0.1$ Å. We observe that their covering fraction for isolated galaxies is significantly higher than the covering fraction obtained for field galaxies in the previously

mentioned papers but remains lower than the results we find for groups, though within the 95 per cent confidence level.

## 7.2 Comparison with literature about groups

It is difficult to compare rigorously our results with the existing literature about groups, first because the definition of what is a group varies (for instance we do not consider pairs of galaxies as groups) and second because many different definitions/methods are used to estimate the covering fraction and could have impacts on the results. None the less, we can perform a qualitative comparison. Nielsen et al. (2018) studied the groups in the MAGIICAT sample. They show that the overall covering fraction (without taking into account the effect of the impact parameter) is higher for groups (at the $2.2\sigma$ level) than for isolated galaxies. They also show that the Mg II equivalent width is consistent with the superposition model proposed by Bordoloi et al. (2011) but that the absorption kinematics reveal a more complex behaviour and make them favour the hypothesis that the absorptions are caused by an intragroup medium rather than by individual galaxies. This assumption is consistent with our finding that the extent of the Mg II halo seems to scale with the mass (hence the virial radius) of the halo.

Dutta et al. (2020, 2021) also studied the impact of environment on the Mg II covering fraction at $z \approx 1$. They find that the covering fraction around groups is three times higher than around isolated galaxies. This result is in line with our conclusion even if their definition of what is a group and their way to compute the covering fraction is different.

Finally, the interpretation of our results on groups along with the existing literature lead to the following picture:

(i) Absorptions are mostly caused by individual or small ensemble of four or less galaxies compatible with their natural correlation in the field. In MEGAFLOW only 21 out of 120 $z < 1.5$ absorptions are caused by groups of more than five galaxies.

(ii) The $W_r^{2796}$ of absorptions associated with overdensities are not higher (Fig. 8). This is consistent with the results from Bouché et al. (2006), Lundgren et al. (2009), and Gauthier et al. (2009) that rather find an anticorrelation with the halo mass. Strong absorptions would hence be preferentially caused by unvirialized clouds of gas mostly due to strong outflows around starburst galaxies. At the contrary the quenching of galaxies as they enter groups lead to less extreme galactic winds and more virialized clouds.

(iii) However, the spatial extent of Mg II is higher for more massive haloes, as $W_r^{2796}$ drops at the virial radius.

(iv) The probability to find an absorption is much higher for dense environments (21 groups out of 26 are associated with an absorption, meanwhile the 101 remaining absorptions of MEGAFLOW are distributed between more than $\approx 1000$ galaxies).

## 7.3 Potential effect of the quasar field pre-selection

One could object that the pre-selection of quasar line of sights based on the presence of multiple strong absorptions ($W_r^{2796} > 0.5$ Å) could introduce a bias in the measurement of the covering fraction presented here. We believe that if it exists, this bias is small for the following reasons.

First, if a bias were present in MEGAFLOW it would have been seen in the analysis of Schroetter et al. (2021) for field galaxies. However, the covering fractions computed by Schroetter et al. (2021)
and the covering fraction from Dutta et al. (2020, on randomly selected LOS) or Lan (2020) are all very similar.

Second, as shown in Schroetter et al. (2021), the Mg II equiva-
lent width distribution (dn/dW) in MEGAFLOW follows the same
exponential law (cexp(-Wt/W₀)) as found in random sightlines
(e.g Nestor, Turnshek & Rao 2005; Zhu & Ménard 2013) but with a
boosted normalization. Hence, even if there were a relation between
the galaxy properties and the Mg II absorption equivalent widths, the
MEGAFLOW pre-selection procedure does not introduce a bias in
the covering fraction.

Third, the covering fraction we compute for groups covers a very wide redshift range (0.3–1.5) with ≈ 4000 spectral channels, or ≈ 2000 independent possible redshifts given the MUSE resolution. The MEGAFLOW survey has ≈ 100 galaxies per field, of which ≈ 50–60 are at these low redshifts. Hence, having 3, 4, or 5 pre-selected absorptions might be affecting the covering fractions of 5 per cent–10 per cent of the samples. In other words, there are no reasons to presume a strong bias due to the absorption pre-selection.

Finally, we performed a quantitative experiment using a simple toy model presented in Appendix B to mimic the effect of the line-of-sight pre-selection based on the presence of multiple strong absorptions. For a sample of ≈20 selected fields (similar to what we have in MEGAFLOW) populated by ≈60 galaxies each, we only observe a small shift in the measured covering fraction, compatible with the 2σ measurement error. With a sample 10 times larger, this shift is significant at the 3.3σ level. Finally, we conclude that if existing, the bias would be at most 5 per cent–10 per cent which is small compared to the factor three that we observe between the covering fraction of groups versus field galaxies.

Bouché et al. (in preparation) present an alternative model to
estimate the effect of sightlines pre-selection. They find that the
field pre-selection has negligible effects on the measured covering
fraction. They also reproduce the distribution of Mg II absorption
equivalent widths (dN/dW) and show that it is not affected by the
selection process.

**7.4 limitations and future prospects**

The work presented here has several limitations. The first one is that, as can be seen from Fig. A1 some groups are probably cropped by the FOV. In such cases, the group centre that we identified could be wrong, as well as the impact parameter relative to the quasar LOS. The impact of this effect is difficult to quantify and has not been taken into account in this work. However the fact that our group centres often match with one or several passive galaxies (as observed in the literature) makes us confident about the robustness of our group finding procedure.

The second one is that the redshift dependency of our results
has not been investigated given the size of our sample. A possible
improvement would be to increase the statistics and to fit the covering
fraction as a function of both the impact parameter and redshift.

This work is focused on groups of five or more galaxies. We justified this choice by the analysis of the two-point correlation function that reveals that the typical number of galaxies expected around an absorption system is ≈3 for the MUSE FOV. As we wanted to study overdensities, we focused on groups with a number of galaxies higher than this value. In addition, we wanted to derive the mass of the groups using the velocity dispersion of the galaxies. That method requires a sufficient number of galaxies. However, our FoF algorithm finds 93 groups having 3–5 galaxies. An extension of this work could be to investigate in more detail the absorptions in quasar sightlines in the vicinity of these smaller groups.

Finally, a detailed case by case analysis of the identified group-
absorption pairs taking advantage of the UVES high-resolution
spectra would be interesting and is planned to be explored in a future
paper.

8 CONCLUSIONS

We presented our results about the cool gas traced by Mg II around groups of galaxies in the MEGAFLOW survey. MEGAFLOW is based on observations from VLT/MUSE and VLT/UVES of 22 quasar fields presenting multiple (≥3) strong Mg II absorptions. A total of 1208 galaxies were detected in the foreground of quasars, both from their continuum and emission lines (mainly [O II]), with estimated log₁₀(M*/M⊙) ranging from 6 to 12 and redshift ranging from 0.1 to 1.5.

Using a combination of an FoF algorithm and a halo occupation
algorithm we identified a total of 33 groups of more than 5 galaxies.
Among them 26 are located at the foreground of the quasars and
can be used to study counterpart Mg II absorptions within quasar
spectra. These groups have 10.8 < log₁₀(M/M⊙) < 13.7 and 0.4 <
z < 1.5. The analysis of the group properties and their counterpart
Mg II absorptions led to the following conclusions:

(i) On the 120 Mg II absorption systems present in MEGAFLOW at $z < 1.5$, 21 could be associated with a group of more than five galaxies.

(ii) For five groups of more than five galaxies, no Mg II absorption has been detected in the nearby quasar spectrum down to a detection limit of $W_r^{2796} \approx 0.1$ Å.

(iii) The $W_r^{2796}$ appears to be clearly anticorrelated with the impact parameter. It drops at ≈150 kpc from the closest galaxy and ≈$R_{vir}$ suggesting that Mg II haloes scale with halo masses.

(iv) The Mg II covering fraction measured for groups is ≈3 times higher than the one computed for field galaxies. This result is consistent with other recent literature results.

(v) However contrary to some other studies, we do not find that $W_r^{2796}$ is higher in groups. It suggests that strong absorptions are preferentially caused by outflows induced by individual star-forming galaxies rather than by accumulation of gas in the intragroup medium.

(vi) We derived H I column densities from $W_r^{2796}$ and compared them to the DM column density profile for a halo of similar mass. The H I and DM profiles exhibit a very similar shape with a clear drop at the virial radius.

(vii) The groups present various morphologies: compact, diffuse, filamentary, or irregular. The associated absorption systems are also diverse. They contain multiple absorption components that are difficult to attribute to individual galaxies.

ACKNOWLEDGEMENTS

This work has been carried out thanks to the support of the ANR
3DGasFlows (ANR-17-CE31-0017).

The calculations and figures have been made using the open-source
softwares NUMPY (van der Walt, Colbert & Varoquaux 2011; Harris
et al. 2020), SCIPY (Virtanen et al. 2020), MATPLOTLIB (Hunter 2007),
ASTROPY (Astropy Collaboration 2013, 2018), and PYMC3 (Hoffman
& Gelman 2011; Salvatier et al. 2016).

The data used in this work are based on observations made with
ESO telescopes at the La Silla Paranal Observatory.
DATA AVAILABILITY

The underlying data used for this article are available in the ESO
archive (http://archive.eso.org). The MEGAFLOW catalogue will
be soon available at the address https://megaflow.univ-lyon1.fr/ and
be visualized at https://amused.univ-lyon1.fr. The data generated for
this work will be shared on reasonable request to the corresponding
author.

REFERENCES

Adelberger K. L., Steidel C. C., Shapley A. E., Pettini M., 2003, ApJ, 584, 45

Anand A., Kauffmann G., Nelson D., 2022, MNRAS, 513, 3210

Astropy Collaboration, 2013, A&A, 558, A33

Astropy Collaboration, 2018, AJ, 156, 123

Bielby R., Crighton N. H. M., Fumagalli M., Morris S. L., Stott J. P., Tejos N., Cantalupo S., 2017, MNRAS, 468, 1373

Bordoloi R. et al., 2011, ApJ, 743, 10

Bouché N., Murphy M. T., Péroux C., Csabai I., Wild V., 2006, MNRAS, 371, 495

Bouché N., Hohensee W., Vargas R., Kacprzak G. G., Martin C. L., Cooke J., Churchill C. W., 2012, MNRAS, 426, 801

Bryan G. L., Norman M. L., 1998, ApJ, 495, 80

Chabrier G., 2003, PASP, 115, 763

Charlton J. C., Mellon R. R., Rigby J. R., Churchill C. W., 2000, ApJ, 545, 635

Chen H.-W., Helsby J. E., Gauthier J.-R., Shectman S. A., Thompson I. B., Tinker J. L., 2010, ApJ, 714, 1521

Churchill C. W., Rigby J. R., Charlton J. C., Vogt S. S., 1999, ApJS, 120, 51

Cochrane R. K., Best P. N., Sobral D., Smail I., Geach J. E., Stott J. P., Wake D. A., 2018, MNRAS, 475, 3730

Correa C. A., Wyithe J. S. B., Schaye J., Duffy A. R., 2015, MNRAS, 452, 1217

Dekker H., D'Odorico S., Kaufer A., Delabre B., Kotzlowski H., 2000, in Iye M., Moorwood A. F. eds, Proc. SPIE Conf. Ser. Vol. 4008, Optical and IR Telescope Instrumentation and Detectors. SPIE, Bellingham, p. 534

Diemer B., 2018, ApJS, 239, 35

Diemer B., 2023, MNRAS, 519, 3292

Dutta R. et al., 2020, MNRAS, 499, 5022

Dutta R. et al., 2021, MNRAS, 508, 4573

Eke V. R. et al., 2004, MNRAS, 348, 866

Epinat B. et al., 2018, A&A, 609, A40

Fossati M. et al., 2019, MNRAS, 490, 1451

Gauthier J.-R., 2013, MNRAS, 432, 1444

Gauthier J.-R., Chen H.-W., Tinker J. L., 2009, ApJ, 702, 50

Gilbank D. G., Baldry I. K., Balogh M. L., Glazebrook K., Bower R. G., 2010, MNRAS, 405, 2594

Girelli G., Pozzetti L., Bolzonella M., Giocoli C., Marulli F., Baldi M., 2020, A&A, 634, A135

Guha L. K., Srianand R., Dutta R., Joshi R., Noterdaeme P., Petitjean P., 2022, MNRAS, 513, 3836

Hamanowicz A. et al., 2020, MNRAS, 492, 2347

Harris C. R. et al., 2020, Nature, 585, 357

Hinshaw G. et al., 2013, ApJS, 208, 19

Hoffman M. D., Gelman A., 2014, Mach. Learn. Res., 15, 1593

Hogg D. W., Bovy J., Lang D., 2010, Data analysis recipes: fitting a model to data, https://arxiv.org/abs/1008.4686

Huang Y.-H., Chen H.-W., Shectman S. A., Johnson S. D., Zahedy F. S., Helsby J. E., Gauthier J.-R., Thompson I. B., 2021, MNRAS, 502, 4743

Hunter J. D., 2007, Comput. Sci. Eng., 9, 90

Jung S. L. et al., 2022, MNRAS, 515, 22

Kacprzak G. G., Murphy M. T., Churchill C. W., 2010, MNRAS, 406, 445

Kacprzak G. G., Churchill C. W., Nielsen N. M., 2012, ApJ, 760, L7

Knobel C. et al., 2009, ApJ, 697, 1842

Lan T.-W., 2020, ApJ, 897, 97

Lan T.-W., Fukugita M., 2017, ApJ, 850, 156

Leclercq F. et al., 2022, A&A, 663, A11

Lundgren B. F. et al., 2009, ApJ, 698, 819

Markowitz E., 1968, Am. Stat., 22, 26

Marulli F. et al., 2013, A&A, 557, A17

Ménard B., Chelouche D., 2009, MNRAS, 393, 808

Mishra S., Muzahid S., 2022, ApJ, 933, 229

Mo H. J., White S. D. M., 2002, MNRAS, 336, 112

Navarro J. F., Frenk C. S., White S. D. M., 1997, ApJ, 490, 493

Nestor D. B., Turnshek D. A., Rao S. M., 2005, ApJ, 628, 637

Nestor D. B., Johnson B. D., Wild V., Ménard B., Turnshek D. A., Rao S., Pettini M., 2011, MNRAS, 412, 1559

Nielsen N. M., Churchill C. W., Kacprzak G. G., 2013, ApJ, 776, 115

Nielsen N. M., Kacprzak G. G., Pointon S. K., Churchill C. W., Murphy M. T., 2018, ApJ, 869, 153

Nielsen N. M., Kacprzak G. G., Sameer Murphy M. T., Nateghi H., Charlton J. C., Churchill C. W., 2022, MNRAS, 514, 6074

Peebles P., 1980, The Large-scale Structure of the Universe. Princeton Series in Physics, Princeton University Press, https://books.google.fr/books?id =PYbNlgEACAAJ

Quast R., Baade R., Reimers D., 2005, A&A, 431, 1167

Rao S. M., Turnshek D. A., Nestor D. B., 2006, ApJ, 636, 610

Rigby J. R., Charlton J. C., Churchill C. W., 2002, ApJ, 565, 743

Rodriguez F., Merchan M., 2020, A&A, 636, A61

Salvatier J., Wiecki T., Fonnesbeck C., 2016, PeerJ Comput. Sci., 2, e55

Schroetter I. et al., 2016, ApJ, 833, 39

Schroetter I. et al., 2019, MNRAS, 490, 4368

Schroetter I. et al., 2021, MNRAS, 506, 1355

Smethurst R. J., Lintott C. J., Bamford S. P., Hart R. E., Kruk S. J., Masters K. L., Nichol R. C., Simmons B. D., 2017, MNRAS, 469, 3670

Tal T. et al., 2014, ApJ, 789, 164

Tinker J. L., 2021, ApJ, 923, 154

Tinker J., Kravtsov A. V., Klypin A., Abazajian K., Warren M., Yepes G., Gottlöber S., Holz D. E., 2008, ApJ, 688, 709

Tumlinson J., Peeples M. S., Werk J. K., 2017, ARA&A, 55, 389

Virtanen P. et al., 2020, Nature Methods, 17, 261

van der Walt S., Colbert S. C., Varoquaux G., 2011, Comput. Sci. Eng., 13, 22

Weilbacher P. M., Streicher O., Urrutia T., Jarno A., Pécontal-Rousset A., Bacon R., Böhm P., 2012, in Radziwiłl N. M., Chiozzi G. eds, Proc. SPIE Conf. Ser. Vol. 8451, Software and Cyberinfrastructure for Astronomy II. SPIE, Bellingham, p. 84510B

Weilbacher P. M., Streicher O., Urrutia T., Pécontal-Rousset A., Jarno A., Bacon R., 2014, in Manset N., Forshay P.eds, ASP Conf. Ser. Vol. 485, Astronomical Data Analysis Software and Systems XXIII. Astron. Soc. Pac., San Francisco, p. 451

Weilbacher P. M., Streicher O., Palsa R., 2016, Astrophysics Source Code Library, record ascl:1610.004

Yang X., Mo H. J., van den Bosch F. C., Jing Y. P., 2005, MNRAS, 356, 1293

Yang X., Mo H. J., van den Bosch F. C., 2009, ApJ, 695, 900

Zabl J., Freuding W., Møller P., Milvang-Jensen B., Nilsson K. K., Fynbo J. P. U., Le Fèvre O., Tasca L. A. M., 2016, A&A, 590, A66

Zabl J. et al., 2019, MNRAS, 485, 1961

Zabl J. et al., 2021, MNRAS, 507, 4294

Zhu G., Ménard B., 2013, ApJ, 770, 130

APPENDIX A: GROUPS VISUALIZATION

The 33 groups with more than five galaxies are presented in Fig. A1. The left column shows the galaxies in projected space. The middle column shows the galaxies in phase space. The right column shows the UVES spectra of the corresponding quasars at the redshift of the groups when available. Passive galaxies (with sSFR < 0.1 Gyr⁻¹) are coloured in red.
<figure><img src="image_13.png" /><figcaption>**Figure A1.** Visualization of the individual groups. Left column: groups in projected coordinates (right ascension and declination). The dots are the galaxies, with a size proportional to the log of their estimated stellar mass. The red dots are the 'passive' galaxies with an sSFR <0.1 Gyr⁻¹. The galaxies circled in red are the galaxies that have been excluded from the group by the halo occupation method. The orange cross is the group centre. The red star at (0,0) is the quasar. The green circle represents a 100 kpc radius around the quasar. Middle: the galaxy distribution in phase space (distance to the centre of the group along the x-axis and velocity separation to the centre of the group along the y-axis). The dashed vertical line is the estimated virial radius. The black lines are the escape velocity caustics computed from the estimated mass of the groups assuming NFW properties. Right: high-resolution spectra of the central quasar. The x-axis represents the velocity difference relative to the centre of the group. The green vertical line is the estimated Mg II absorption velocity difference. The blue lines are the velocity differences of the galaxies in the group.</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>Figure A1. (Continued.)</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>**Figure A1.** (Continued.)</figcaption></figure>
<figure><img src="image_16.png" /><figcaption>Figure A1. (Continued.)</figcaption></figure>
<figure><img src="image_17.png" /><figcaption>Figure A1. (Continued.)</figcaption></figure>

## APPENDIX B: ABOUT THE EFFECT OF THE MEGAFLOW SELECTION

As discussed in Section 2, the MEGAFLOW survey is built around a sample of quasar sightlines with multiple (N = 3, 4, and 5) Mg II systems at 0.3 < z < 1.5 (Schroetter et al. 2019; Zabl et al. 2019; Bouché et al., in preparation). This pre-selection of sightlines might introduce a bias in the measurement of the covering fraction. In Section 7.4, we present qualitative arguments against such bias. Here, we quantify the potential bias on the covering fraction caused by the pre-selection of quasar sightlines, which is only relevant for galaxy-based analysis such as the covering fraction in galaxies (Schroetter et al. 2021) or groups, as in this paper.

To quantify such bias, the idea is to build a toy model that mimic a sample of MUSE fields randomly populated with galaxies and to select those with more than three strong absorptions. We then estimate the covering fraction for these selected fields and compare it to the one that we would have without selection.

Specifically, we considered 50 fields of view of 500 × 500 kpc (similar to the MUSE FOV at z ≈ 1) that we assumed centred on a quasar sightline. We then populate each of these fields with N galaxies (from a Poisson distribution of parameter λ = 60) with random projected coordinates. For each galaxy we then assign two Boolean flags representing respectively the presence of a weak (>0.1 Å) and a strong (>0.5 Å) counterpart Mg II absorption. For that we use two different covering fractions (shown in Fig. B1) based on the results from Dutta et al. (2020).

We then select the fields with at least 3 strong absorptions (with $W_{r}^{2796} > 0.5$ Å) to mimic the MEGAFLOW pre-selection. There are 21 such fields, which is similar to the number of fields in MEGAFLOW.

Finally, in these selected fields, we recompute the 0.1 Å covering fraction and compare it to the 0.1 Å covering fraction for the whole sample. To compute the 0.1 Å covering fraction, we use the method described in Schroetter et al. (2021) in Section 6. Fig. B2 shows the covering fraction on the pre-selected sample compared to the
<figure><img src="image_18.png" /><figcaption>**Figure B1.** Assumed universal differential covering fractions used for the toy model for 0.1Å (orange) and 0.5Å (blue) detection limits. These assumed covering fraction are consistent with the differential covering fraction presented by Dutta et al. (2020).</figcaption></figure>

one on the whole sample with the computed $2\sigma$ intervals. Finally, we find that the 0.1 Å covering fractions reach 50 per cent at $57.8_{-8.6}^{+8.2}$ and $49.8_{-5.9}^{+5.5}$ kpc (the indicated error are $2\sigma$), respectively, for the selected and the whole sample. The two are statistically compatible with each other within the $2\sigma$ uncertainties. In order to have more statistics, we perform the same experiment with 500 fields (that yields $\approx 200$ pre-selected fields). We find that the 0.1 Å covering fractions reach 50 per cent at $61.4_{-2.5}^{+2.5}$ and $56.3_{-1.8}^{+1.8}$ kpc, respectively, for the selected and the whole sample. The two are values are in tension at the $3.3\sigma$ level. So finally we conclude that the pre-selection might introduce a small bias of 5 per cent–10 per cent. This bias is negligible compared to the factor three that we observe between the covering fraction of groups versus field galaxies.

Some tests on the parameters of this toy model reveal that the magnitude of this relatively low significance shift is mainly driven by the slope of the covering fraction. Indeed, the slope of the covering fraction encodes how the gas haloes are similar with

each others. The steeper is the slope, the smaller are the effects of the field selection because the presence of Mg II is hence mostly determined by the impact parameter and does not depends on galaxy properties.

<figure><img src="image_19.png" /><figcaption>**Figure B2.** Comparison of the computed 0.1 Å covering fraction for the selected sample versus for the whole sample.</figcaption></figure>

This paper has been typeset from a TeX/LATeX file prepared by the author.