Circumgalactic Environments Around Distant Quasars 3C 9 and 4C 05.84

We present results from the Quasar hosts Unveiled by high Angular Resolution Techniques survey studying the circumgalactic medium (CGM) by observing rest-frame UV emission lines Lyα, C iv, and He ii around two radio-loud quasars, 3C 9 (z = 2.02) and 4C 05.84 (z = 2.32), using the Keck Cosmic Web Imager. We detect large-scale Lyα nebulae around both quasars with projected diameters ∼100 kpc, with spatially resolved, embedded 15–30 kpc He ii and C iv nebulae around both quasars as well as kinematically distinct He ii and C iv nebulae at a physical separation of ∼15 kpc from both quasars. Observations of Hα, Hβ, and [O iii] emission using Keck MOSFIRE spectroscopically confirm that the Lyα nebulae extend to companion galaxies and that these quasars are in a protogroup/protocluster environment. We confirm that the He ii and C iv emission is kinematically and spatially coincident with the companion galaxies. We estimate the virial masses of the companion galaxies, their metallicities, and star formation rates, and investigate the sources of ionization. We measure the dynamical mass of the host dark matter halos and estimate that the dark matter halos of these systems will grow to a mass of 2 × 1014 M ⊙ (3C 9) and 2 × 1013 M ⊙ (4C 05.84) by z = 0. The combined CGM and companion galaxies observations indicate Lyα substructure can indicate the presence of companion galaxies in the CGM.


INTRODUCTION
Recent theoretical and observational studies have highlighted the necessity and utility of studying the internal properties of galaxies in conjunction with their larger environment and underlying circumgalactic medium (CGM).The complex interplay between star formation (Madau & Dickinson 2014), metallicity, Corresponding author: Sanchit Sabhlok ssabhlok@ucsd.edudust, active galactic nucleus (AGN) and the subsequent growth of supermassive black holes (SMBH) (Kormendy & Ho 2013), plays a critical role in a galaxy's growth.Studying the connection and role of the CGM in the growth of galaxy progenitors is observationally challenging since it requires investigating the underlying physics that operates across a wide range of length scales (parsecs to 100 kiloparsecs) and time scales (Tumlinson et al. 2017).Additionally, it requires understanding the impact of potential mergers or satellite galaxies on the evolution of the central host galaxy, which is largely dominated by the gravitational interaction of dark matter halos in which galaxies reside (Overzier 2016).Simulations have fundamental issues trying to replicate physics across a dynamic range of length scales due to limited numerical resolution.In practical terms, this means implementation of subgrid models for numerically unresolved but important phenomena such as Molecular Clouds (O(10-100 pc)), Supernovae or AGN.On larger length scales, cosmological simulations tend to focus on Dark Matter (DM) only simulations making it difficult to study the impact of baryonic physics on large scale structure.Recently, multiple simulations have studied a numerically resolved model of the CGM, investigating the implications of enhanced spatial resolution on the convergence of observable properties of the CGM (van de Voort et al. 2019;Peeples et al. 2019;Hummels et al. 2019;Bennett & Sijacki 2020;Gronke et al. 2022).They find that enhanced spatial resolution increases total H I covering fraction, increased cold gas content and increased inflowing gas mas flux.These simulations show that cloud sizes are still not converged and improving the spatial resolution of these simulations could allow for larger observed values of cold gas mass (Cantalupo et al. 2014).Additionally, spatial resolution of the CGM is important to match the observed distribution of absorber properties O' Meara et al. (2015) and that spatial resolution can affect the predicted total luminosity of Hα by a factor of two and by an order of magnitude for other lines such as C III and C IV (Corlies et al. 2020), something only observations can clarify.Thus, it is critical to complement our understanding of galaxy evolution gained from simulations with multi-wavelength observations of individual sources to connect the dots between physical processes occurring across a large dynamical range of length scales.On Keck, the Multi-Object Spectrometer for Infra-Red Exploration (MOSFIRE) has enabled targeted surveys such as the MOSFIRE Deep Evolution Field Survey (MOSDEF) (Kriek et al. 2015a) and the Keck Baryonic Sky Survey (KBSS) (Steidel et al. 2014) which build upon the success of the Sloan Digital Sky Survey (SDSS) (York et al. 2000) by extending our understanding of stellar evolution, metallicities and star formation to higher redshifts.Instruments such as the Keck Cosmic Web Imager (KCWI) (Morrissey et al. 2018) on Keck and the Multi Unit Spectroscopic Explorer (MUSE) (Bacon et al. 2010) on the Very Large Telescope (VLT) have come online to present compelling pictures of the CGM surrounding galaxies at 1.5 < z < 4. Prior to the advent of these instruments, narrow band imaging revealed some of the first observed Lyα blobs (Hu & Cowie 1987;Steidel et al. 2000;Heckman et al. 1991b), with follow up long slit spectroscopy revealing spatially extended emission 10s of kpc away (Heckman et al. 1991a).Theoretical work indicated extended Lyα emission was linked to the multiphase structure of infalling CGM gas (Haiman & Rees 2001).Additionally, these nebulae were observed in the vicinity of quasars since surface brightness of the nebulae is boosted by the fluorescence emission due to recombination radiation (Cantalupo et al. 2005;Kollmeier et al. 2010).The advent of the Integral Field Spectrographs (IFS) KCWI and MUSE means that instead of narrow band imaging followed by long slit spectroscopy, we can now spatially map out the emission and kinematics of such nebulae around potential targets with greater ease.Borisova et al. ( 2016) identified 17 radio-quiet quasars in addition to 2 radio loud quasars with extended Lyα emission using MUSE/VLT finding cold gas ubiqitous around these sources within 50 kpc at 3 < z < 4. Arrigoni Battaia et al. (2019) identified a sample of 61 Lyα nebulae around quasars, 15 of which are radio loud, with MUSE/VLT at z ∼ 3, studying the morphology and sources of ionization for the nebulae.Cai et al. (2019) studied a sample of 16 ultraluminous Type 1 QSOs around z ∼ 2 using KCWI and suggested that cool gas mass decreases going from z ∼ 3 to z ∼ 2. Recent works have investigated the role of CGM around radio-loud AGN using Lyα spectroscopy finding evidence for correlation between Lyα detection and the extent of the radio source (Shukla et al. 2022) and further evidence of companion galaxies around these sources (Vayner et al. 2023).While these observations have established the ubiquity of Lyα nebulae and their prevalence around quasars, separating the role of the host galaxies in the evolution of these nebulae from their surroundings requires us to study them in tandem with a survey of the larger environment.Tracing the origins of the most massive clusters remains challenging at high-redshift since identifying gravitationally bound structures requires spectroscopic confirmation.The Visible Multi-Object Spectrograph (VI-MOS) Ultra Deep Field (UDF) Survey (Le Fèvre et al. 2005) surveyed 0.61 squared degrees of the night sky using the VLT and identified several large protoclusters of galaxies (Cucciati et al. 2014;Lemaux et al. 2014;Cucciati et al. 2018).However, in the absence of a large spectroscopic survey, searches for these structures need to be conducted by spectroscopic follow-up on imaging data sets.Wylezalek et al. (2013) used Spitzer imaging to search for galaxy clusters around radio-loud AGN at 1.3 < z < 3.2.This study observed an overdensity of sources around these AGN with Spitzer Infrared Array Camera (IRAC) imaging, suggesting that radio-loud quasars can be used to look for high redshift protoclus-ters.These protoclusters are likely to be progenitors of the Brightest Cluster Galaxies (BCG) found at the centers of the largest clusters observed in present-day.Since the CGM is a large, diffuse, multiphase medium, having as much information about the system being studied would help decipher the impact of different processes on the CGM.Selection of radio loud quasars to study the CGM around the host galaxies offers several advantages.Firstly, the quasar illuminates the CGM and boosts Lyα fluorescence which makes observing large Lyα nebulae around these sources easier.Secondly, in an idealized version of the unified AGN model, the orientation of the radio jet is expected to be normal to the accretion disk and the surrounding dusty torus in an AGN.Since we primarily expect Lyα to be emitting due to quasar photoionization and due to scattering of light from the AGN and/or the host galaxy, the jet provides a valuable reference orientation against which Lyα morphology can be compared.Lastly, literature indicates that radio-loud AGN at high redshift are some of the rarest objects in the universe and that they preferentially reside in protocluster environments (Rigby et al. 2011;Wylezalek et al. 2013;Hatch et al. 2014;Lacy & Sajina 2020).Observing the CGM around radio-loud quasars could potentially reveal signatures of companion galaxies, residing in the quasar host galaxy's dark matter halo.Previous detection of large C IV and He II emission around quasars have provided valuable information regarding the ionizing source of the gas, which has been attributed to star formation (Villar-Martín et al. 2007) and quasar ionization (Falkendal et al. 2021).C IV and He II lines are smaller in extent than Lyα emission and found to be embedded within the CGM halos of the host galaxy (Villar-Martín et al. 2003;Vernet et al. 2017).Thus, mapping the extent and relative strengths of these lines with respect to Lyα may provide valuable insight regarding the ionizing source powering the emission.In this paper, we present new results of two well studied radio-loud quasars, 3C 9 (z = 2.02) and 4C 05.84 (z = 2.32) using new observations in conjunction with a wealth of ancillary data, described in detail in Section 2. Our targets provide a unique opportunity to study the interplay of galactic outflows, radio jets, CGM, and companion galaxies.This paper is organized as follows.In section 2, we describe the target selection, ancillary data and observations.In section 3, we discuss the data reduction techniques employed.In section 4, we look at the PSF subtracted Lyα, He II and C IV emission around the quasars.In section 5 we discuss the confirmed spectroscopic protogroup/protocluster members in the larger environments around these quasars.In section 6, we discuss our findings, considering the impact of the environment on the CGM, sources of ionization powering the nebulae, the mass growth of the two quasar systems, and the inner and outer CGM model as applicable to our observations.We summarise our findings in section 7. Unless stated otherwise, we assume Ω M = 0.308, Ω Λ = 0.692 and H 0 = 67.8km s −1 Mpc −1 for the cosmological parameters (Planck Collaboration et al. 2016).

TARGET SELECTION
Herein, we present new results on two sources, radioloud quasars 3C 9 (z=2.02)and 4C 05.84 (z=2.32).These quasars as part of the "Quasar hosts Unveiled by high Angular Resolution Techniques" (QUART) survey (Vayner et al. 2017(Vayner et al. , 2021b,c) ,c) initially selected for observations with Keck "OH-Suppressing Infra-Red Imaging Spectrograph" (OSIRIS) (Larkin et al. 2006) and the facility laser-guide star adaptive optics system (LGS-AO).3C 9 is one of the most luminous sources in the 3C radio catalog.Bridle et al. (1994) first observed the detailed radio jet and lobe structure around the quasar using deep VLA observations, whereas Wilman et al. (2000) first detected extended emission lines around the quasar.Chandra observations of 3C 9 revealed extended X-ray emission from the quasar with two sidelobes aligned with the radio lobes observed using VLA.4C 05.84 was first identified by Gower et al. (1967) as a radio source.Barthel & Miley (1988) carried out detailed radio observations establishing the extent and geometry of the radio jet and the spectral index for the quasar.Barthel et al. (1990) measured the redshift of the source as 2.323 based on an average of observed emission lines (λ Lyα = 1215.67Å; λ CIV = 1549.06Å; λ CIII = 1908.73Å).Heckman et al. (1991b) carried out deep optical imaging of both quasars and detected extended Lyα nebulae around both 4C 05.84 and 3C 9. OSIRIS observations of the quasars' host galaxies revealed that either star formation or the AGN could drive outflows in 3C 9, since they are aligned with the radio jet of the quasar but appear to originate in the star forming regions without extending to the quasar host galaxy nucleus.For 4C 05.84, observations revealed the presence of galactic scale outflows most likely driven by either an isothermal shock or due to radiation pressure by the quasar.Follow up ALMA observations of 4C 05.84 (Vayner et al. 2021a) reveal that the outflow in the quasar host galaxy is multi gas phase with the detection of a molecular outflow traced using the CO (4-3) transition.While the majority of the energetics are in the ionized gas phase, most of the mass in the outflow is found in the cold molecular gas phase.The detected outflows are also aligned with the path of the jet indicating that the jet could be responsible for driving the outflow.We found that both quasar host galaxies lie off the local scaling relationship between the mass of the Supermassive Black Hole (SMBH) and the mass of the galaxy (McConnell & Ma 2013).The stellar mass of both galaxies will require growth by a factor of ∼ 10 between redshift of 2 and 0 in order to end up on the local scaling relationship.To target potential companion galaxies around both quasars using MOSFIRE, we used Spitzer and Hubble imaging to identify potential targets in the environment around the quasars for spectroscopic confirmation and optical nebular line studies.We used publicly available observations from the Hubble Space Telescope (HST) WFC3 and ACS instruments, along with data from the Spitzer IRAC 3.6 µm and 4.5 µm channels to perform an overdensity analysis.All the HST data used in this paper can be found in MAST: 10.17909/czbk-dw64.The Spitzer data products were obtained from Capak;Peter (2019).We have utilized HST WFC3 IR F160 images for 3C 9.No HST data was available for 4C 05.84 at the time of analysis.
We followed the procedure outlined in Wylezalek et al. (2013) to analyse the Spitzer archival data.We performed a color cut [3.6]AB − [4.5] AB > −0.1 to select sources with z > 1.3 (Papovich 2008).We present the results of the color cut in Figure 1.We calculate the number density of such sources around 3C9 in a 1 arcmin radius to be Σ 3C9 = 16.5 arcmin −2 which compared to the Spitzer UKIDSS Ultra Deep Survey (SpUDS) blank field (Σ SpUDS = 8.3 arcmin −2 ; σ SpUDS = 1.6 arcmin −2 ) in Wylezalek et al. (2013) implies an overdensity of 5.1σ.Similarly, we obtain Σ 4C0584 = 16.8 arcmin −2 which implies an overdensity of 5.3σ.The exposure times for archival data were shorter than those used by Wylezalek et al. (2013) and therefore result in relatively higher errors for IRAC fluxes obtained from Spitzer.We note that these errors propagate into our color calculations, which could increase the number of outliers.

NIRC2
We have archival NIRC2 observations of the quasar 4C 05.84 (PI: Stockton), which we have reduced using in house code to obtain the RGB composite shown in Figure 2. Our observations consist of AO Laser Guide Star (LGS) assisted imaging of the quasar in the J, H and Kp bands on NIRC2, using the wide camera at a plate scale of 0.04 ′′ /pixel.The total exposure times were 25 minutes in Kp, 25 minutes in H and 54 minutes in the J band.Our data reduction follows the procedure outlined in Melbourne et al. (2005) using the distortion solution from Yelda et al. (2010).We calculate sky residual brightness to be 22.2 mag arcsec −2 for J band, 21.2 mag arcsec −2 for H band and 20.3 mag arcsec −2 for Kp band.We have combined the data into an RGB using the Astropy implementation of the method outlined by Lupton et al. (2004).

KCWI
We observed 3C9 using KCWI on October 3/4, 2018 and followed up on August 17, 2020.The total time spent on 3C 9 was 6.5 hours.We observed 4C 05.84 with KCWI on November 22/23, 2017, July 8-10 2018 and October 2, 2018, for a total of 9.3 hours.We dithered with an ABAAB pattern where the A frame targets the quasars and the B frames are "pure" sky frames, ensuring we have at least one neighboring sky frame for each object frame.For both quasars, we used the medium slicer with the BL grating and KBlue filter with the wavelength centered at 4500 Å.For the final reduced data, our wavelength coverage was 3532 Å to 5527 Å, at a spectral resolution of 1,800.The field of view for this KCWI configuration is 16.5 ′′ × 20.4 ′′ , which was spatially dithered in units of 0.3 ′′ .We observed standard stars at the beginning and end of the night.
Primary data reduction was carried out using the KCWI Data Reduction Pipeline v1.1 (Neill et al. 2018).The pipeline performs cosmic ray removal, wavelength solution, flat-fielding and dark corrections, differential atmospheric refraction corrections and flux calibration.We skipped the pipeline sky subtraction and performed sky subtraction using our own routine.Sky subtraction was carried out by comparing the observed average flux in a sky patch on the object frame with a pure sky frame to obtain a scaling factor.Since this scaling factor may vary with wavelength, we performed this piece-wise along the wavelength axis to get the best residuals post sky subtraction.To correct the WCS information in the sky subtracted frames, we performed a 2D Gaussian fit using the photutils package to determine the quasar centroid.This Gaussian fit was performed at a wavelength slice far from the quasar expected emission lines to sample the point spread function (PSF).We assigned this centroid the coordinates from GAIA (Gaia Collaboration et al. 2018).These WCS corrected, sky subtracted cubes were co-added using CWITools (O'Sullivan & Chen 2020) to give the final reduced datacube.The package also re-samples the datacubes from their native pixel scale of 0.69 ′′ × 0.29 ′′ to a grid with a pixel scale of 0.3 ′′ × 0.3 ′′ and combines individual data cubes using the Drizzle algorithm (Fruchter & Hook 2002).After performing PSF Subtraction on this co-added datacube, we then used CWITools to obtain segmentation maps for Lyα, He II and C IV emissions lines, as well as subsequent surface brightness and moment maps for each emission line.We performed PSF subtraction on the KCWI data as described in Vayner et al. (2016).To summarise the procedure, we construct a PSF image by using the continuum emission from the quasar and the wings of the broadline emission lines at large velocity offset from systemic to avoid including any potential extended emission from the host galaxy or the CGM.This PSF image is then normalized to the peak flux and subtracted out at each wavelength channel while re-scaling the flux to the peak of the emission at that channel.To verify good spatial and spectral PSF subtraction, we proceed as follows.We analyse the radial profile of the resultant PSF subtracted data cube and compare it directly to the original data.For good PSF subtraction, we expect the flux to become comparable to sky residuals at a distance comparable to the size of the seeing disk, which for our nights was 0.5 -0.7 ′′ .The reconstructed PSF FWHM from KCWI data (with a slight wavelength dependence) is well-matched.There are wavelength dependencies to the PSF and spaxels close to the quasar show residual broad-line emission.PSF subtraction is good for all spaxels further than 0.6 ′′ -0.9 ′′ (2 -3 pixels) of the quasar.To optimize PSF subtraction we have constrained our PSF to two critical wavelength regimes, those around the Lyα and C IV emission lines, constraining the broad line residual emission and over subtraction to within the expected sky residual noise.Surface brightness maps beyond 0.9 ′′ (3 pixels) should be minimally effected by PSF subtraction.

MOSFIRE
We observed 3C 9 using MOSFIRE on August 11/12, 2020 and 4C 05.84 on August 13, 2020 in H and K bands.The weather was clear with seeing estimated between 0.4 ′′ and 0.5 ′′ .We aimed to detect Hα,[NII], [S II] in the K-band and [O III] and Hβ in the H-band, given that 3C 9 is at a redshift of 2.019 and 4C 05.84 at 2.32.The slitmask configurations are described in Table 1.For each slitmask, we observed one continuum source with H magnitude less than 15 in a science slit to correct for instrumental drift during reductions.Other than Mask 1 which used the 3C 9 quasar as the continuum source itself, all other masks used stars from The Two Micron All Sky Survey (2MASS) (Skrutskie et al. 2006) as continuum sources.We used a slit width of 0.7 ′′ which gives R = 3270.The individual exposure time in H band was 120s whereas for the K band it was 180s.We dithered using the ABBA observing mode.We observed the star HIP 116886 (spectral type A0V), selected from the ESO list for Spectrophotometric standards,1 for telluric correction and flux calibration using the long2pos slitmask.
We reduced the data using the MOSDEF pipeline (Kriek et al. 2015b).The pipeline carries out sky subtraction, masks bad pixels and cosmic rays, and combines individual frames.The pipeline also corrects for instrumental drift using the specified continuum source in a mask.We used the observed telluric star to perform our own flux calibration.We first perform a wavelength calibration for the telluric spectrum using arc lamps in K-band and atmospheric OH lines in H-band.We extracted the 1D spectrum of the star observed using the long2pos specphot mask.The long2pos script obtains 4 spectra at the spectral resolution of the science exposure, two at the low end and two at the high end of wavelength coverage.We pick the higher throughput spectrum from each wavelength end.We fit a Gaussian to any hydrogen absorption lines in the stellar spectrum to subtract them out.We also detect and remove spurious spikes in the extracted spectrum that are from residual bad pixels.We then construct a blackbody emission model for the effective temperature of the spectral type, normalised to the 2MASS flux of the observed standard (Skrutskie et al. 2006).We divide the stellar spectrum by the blackbody spectrum to get the response curve for the instrument, which includes atmospheric and telescope-instrument response.We use the response spectrum to convert the extracted spectra from Datanumbers/s to ergs cm −2 s −1 / Å. Lastly, we independently checked the quality of flux calibration by checking the flux of continuum sources on science masks and comparing them to the expected 2MASS flux densities.We find that the MOSFIRE derived magnitudes are in agreement to within 0.2 mag for all H and K band masks, after correcting for slit loss and the differences between MOSFIRE and 2MASS bandpasses.Since Hβ emission for 3C 9 falls close to the atmospheric window, the flux calibration for Hβ has higher uncertainty.We also compare the response spectrum across different nights and find them to be qualitatively consistent with each other, i.e. the wavelengths for observed sky lines and any absorption lines in the telluric stars are consistent across different nights.

KCWI RESULTS: CIRCUMGALACTIC MEDIUM
We extract flux and moment maps of each emission line for 3C 9 and 4C 05.84 using the CWITools package.We first perform a segmentation of the PSFsubtracted data cube for each emission line (Lyα, C IV and He II), using a minimum threshold of 2σ, using the cwisegment routine.This gives us a resultant masked datacube where all pixels below the minimum threshold are masked.A zero-moment map is created by simply summing the flux from all the unmasked spaxels.The velocity (moment 1) and dispersion (moment 2) maps are created similarly by applying the respective moment equations to the unmasked spaxels in this datacube.The resultant moment maps for 3C 9 are in Figure 3  The KCWI observations are sensitive to 2σ flux limits of 5 × 10 −20 erg s −1 cm −2 arcsec −2 .We detect Lyα emission extending throughout our field of view around 3C 9 with the most prominent emission seen as a nebulae with a diameter of 120 kpc centered on the quasar.The southern part of the nebula shows distinct clumps of Lyα with two faint peaks clearly identified southwest and southeast of the quasar.We also detect two distinct He II nebulae, the first around the quasar host galaxy with a spatial extent of 40 − 50kpc and a second about 30 kpc away, with a spatial extent of ∼ 30 − 40kpc.Both He II and C IV emission around the quasar appears to have a biconical morphology.The radial profile of the three emission lines for the two quasars are in Figure 5.For purposes of discussion, we can demarcate different regions in the CGM around the quasars as shown in Figure 6.We have region 3C9a (Northern cone), region 3C9-b (Southern cone) and region 3C9-c (Southern cloud further away from the quasar).We detect a C IV emission nebula coincident with the He II emission closer to the quasar in 3C9-a and 3C9-b, but do not detect any spatially resolved C IV emission coincident with the He II nebula in 3C9-c.We note that He II emission does not necessarily coincide with peaks in Lyα surface brightness, in fact, we detect no He II for the bright south-east Lyα peak or the fainter south-west Lyα peak.
As discussed in section 3, we have residual emission from the broad line region in the innermost 2-3 pixels, which translates to ∼ 7 kpc from the center.As a result, we treat the innermost radial profile as an upper limit and discuss the features seen greater than 7 kpc away, which corresponds to 3 pixels.The radial profiles for 3C 9 similarly indicate that the He II emission seen in region 3C9-c is a distinct component, showing no spatially resolved C IV emission, however this may be due to observational sensitivity.
We detect a smooth velocity gradient across the nebula with velocity ranging from −800 km s −1 to 1000 km s −1 relative to the systemic redshift of the system (z 3C9 = 2.02).region 3C9-c has a velocity greater than 800 km s −1 with respect to the quasar, seen both in He II and Lyα.We can also see a region of high dispersion south of the quasar, with dispersion values measured to be in excess of 500 km s −1 in Lyα as seen in the moment 2 map in Figure 3.The He II nebula around the quasar host galaxy shows a smooth velocity gradient from 3C9-b to 3C9-a, with a velocity gradient between −400 km s −1 to 250 km s −1 .On the other hand, region 3C9-c shows a relative velocity gradient from ∼ 400 km s −1 to 800 km s −1 , with the brightest part of the emission in a narrow ∼ 15 kpc clump of gas at a velocity of 800 km s −1 with respect to the quasar.The southern He II emission has very low velocity dispersion across the nebula with values < 100 km s −1 .The emission of He II in 3C9-c seems kinematically consistent with the Lyα emission in the region, even though the Lyα emission shows shows a gradient around the region.

4C 05.84 CGM
We detect Lyα emission for 4C 05.84 extending throughout our field of view up to a scale of 120 kpc in diameter in the immediate vicinity of the quasar and in faint but spatially resolved peaks southwest of the quasar.The presence of substructure can further be seen in the radial profile of the Lyαemission in Figure 5.We detect two distinct He II nebulae, the first immediately around the quasar, with an extent of 20 kpc and a second about 20 kpc southeast of the quasar, with an extent of 30 kpc.Similar to 3C 9, we denote different regions around the CGM as region 4C0584-a (North Eastern We show the Lyα nebulae as seen by KCWI, shown as dashed contours for both quasars.The inner and outer contours correspond to an observed flux density of 1.0 and 0.1 ×10 −16 erg s −1 cm −2 arcsec −2 respectively.For 3C 9, we overlay this on an HST WFC3 F160 image (Left) and for 4C 05.84 we overlay MOSFIRE slits on a NIRC2 RGB composite where the red, green and blue channels correspond to Kp, H and J band images of the quasar 4C 05.84 respectively (Right).We also display the spatial location of emission lines as detected with MOSFIRE and label the individual sources as shown in Table 2.We also overlay the contours of the radio jets coming out of the two quasars in magenta.cone), region 4C0584-b (South Western cone) and the region 4C0584-c (South West cloud further away from the quasar) as seen in Figure 6.The He II emission in the immediate vicinity of the quasar in regions 4C0584-a and 4C0584-b is markedly fainter than that in 4C0584c, which is also larger in size.This is surprising since we a priori expect both nebulae to be photoionized by the quasar.We detect slightly larger C IV emission nebulae around both He II nebulae.The C IV emission around the He II in 4C0584-c also appears to have a biconical morphology.From the radial profile in Figure 5, we see that He II emission follows that of C IV for 4C 05.84, including that in 4C0584-c.
The Lyα moment 1 map for 4C 05.84 shows a smooth gradient across the nebula ranging from −600 km s −1 to 800 km s −1 with dispersion < 400 km s −1 for the bulk of the nebula beyond the immediate vicinity of the quasar.The He II emission in 4C0584-c lies within a velocity gradient of 100 km s −1 to 300 km s −1 with dispersion < 150 km s −1 .Similar to 3C 9, the He II emission velocity gradient seems to match the corresponding Lyα velocity gradient in the region indicating the emission originates from the same region of gas with similar sources of ionization.
The moment 1 map for 4C0584-c indicates a gradual velocity change in the observed C IV emission from southeast to northwest.However, we do not see clear evidence of a radially decreasing dispersion profile, as seen around the quasar in C IV.If the apparent biconical nature of C IV is due to the presence of an obscured AGN, we would expect to see higher values for velocity dispersion in the center of the nebula as a result of outflows from the AGN.Since we do not see any evidence of outflows, the apparent biconical nature of the observed C IV emission is likely due to the complex geometry of the nebulae and the presence of dust between the quasar and the nebula illuminating certain parts of the nebula more than others.

C IV/Lyα and He II/Lyα ratio maps
Previous works in the literature have indicated that C IV/Lyα and He II/Lyα ratios can be used to probe the metallicity and ionization in the CGM around a quasar (Feltre et al. 2016;Guo et al. 2020;Lau et al. 2022).In this section, we use the surface brightness maps in Figures 3 and 4 to construct spatial maps for C IV/Lyα and He II/Lyα.We use these maps to explore the ionizing source and metallicity of the CGM around these two quasars in Section 6.4.These maps are presented in Figure 6.Both quasars show biconical morphologies in

Asymmetry of Lyα halos
We calculate the asymmetry of the Lyα nebulae by calculating the second order moment of the flux (Stoughton et al. 2002).These moments are defined as Where x N eb and y N eb are flux weighted centroids for the 2σ isophotes of the nebulae and r is the distance of a given pixel from the centroid.We can then calculate the Stokes parameters using the moments and derive the ratio between the minor and major axes of the nebula as the asymmetry α and the angle ϕ by using We center the surfaces on the quasar and construct successively larger annular regions to extract the azimuthally averaged surface brightness.We omitted the innermost 2 pixels, which corresponds to 0.6 ′′ corresponding or approximately 5 comoving kpc to avoid any contamination from PSF subtracted residuals.
Here, the angle ϕ is the angle between the major axis and the nearest X or Y axis.The results are shown in Figure 8.We also plot the major axis for the Lyα nebulae and the radio jets in Figure 9 We show the results from the z ∼ 3 radio-loud and radio-quiet quasars from Arrigoni Battaia et al. (2019) and z ∼ 2 quasars from Cai et al. (2019).To provide a comparison at a similar surface brightness limit to previous studies (i.e., 1σ limit in Cai et al. (2019) is 9 × 10 −19 erg s −1 cm −2 arcsec −2 and 2σ in Arrigoni Battaia et al. ( 2019) is 4 × 10 −18 erg s −1 cm −2 arcsec −2 ) we provide an asymmetry figure where we have considered a surface brightness limit of 2 × 10 −18 erg s −1 cm −2 arcsec −2 Ṫhe median projected areas at z ∼ 2 and z ∼ 3 are 63 arcsec 2 and 123 arcsec 2 respectively whereas the median asymmetries at these redshifts are 0.71 and 0.54 respectively.Once we take observational sensitivities into account, we find that 3C 9 is larger than the median Lyα nebula at z ∼ 2 and z ∼ 3, but 4C 05.84 is very similar in area to nebulae at z ∼ 3 but significantly larger than median area at z ∼ 2. While 3C 9 is more symmetric than the z = 2 Lyα 4C 05.84 is again comparable to median asymmetry of z ∼ 2 nebulae.While longer exposure times increased the detection area only modestly for 3C 9, with no notable change in the calculated asymmetry α value, the changes for 4C 05.84 are statistically significant.We conclude that 4C 05.84 is largely consistent with the expected asymmetry for nebulae at this redshift, whereas 3C 9 is more axi-symmetric than other samples.Both nebulae are larger than expected for z ∼ 2 sources projected on-sky area.
We also determine the axis of the radio jet and compare this angle with that of the Lyα nebula.We measure the angle between the radio and CGM axes to be 52.3 degrees for 3C 9 and 22.5 degrees for 4C 05.84.

MOSFIRE RESULTS: GROUP/CLUSTER MEMBER PROPERTIES
We use MOSFIRE to target potential group/cluster members around both quasars up to an angular separation of 3 arcminutes, which translates to a comoving distance of approximately 1.4 Mpc at the redshift of the quasars.The number of science targets we have for each mask are detailed in   3 and 4. We divide C IV and He II surface brightness maps by the Lyα maps to obtain the surface brightness ratios presented here.Three distinct regions are identified based on their spatial locations.3C 9 shows a biconical outflow in C IV and He II with the northern cone denoted as region 3C9-a (outlined in cyan) and a southern cone denoted as region 3C9-b (outlined in red).We also see a large Southern cloud in He II (outlined in purple) denoted as region 3C9-c.For 4C 05.84, we see the biconical shape in C IV emission showing a Northeastern cone denoted as region 4C0584-a (outlined in cyan) and a southwestern cone (outlined in red) denoted as region 4C0584-b.We don't detect significant He II emission in this region.We also see evidence of a larger southeastern cloud denoted as region 4C0584-c (outlined in purple) seen both in C IV and He II.
ble 2 lists spectroscopically identified MOSFIRE sources around the two quasars.We also list the extracted line fluxes for all spectroscopically detected members in Table 3. Lastly, we show the extracted NIRC2 magnitudes for MOSFIRE confirmed sources in Table 4.We spectro-scopically confirmed sources at z > 1.3 for 15 out of 62 targets in the 4C 05.84 field, and 19 out of 94 targets in the 3C 9 field.For identification of group/cluster members, we chose a redshift range of z quasar ±0.01.We only confirm sources that have multiple emission lines detec- .We used the surface brightness ratio maps in Figure 6 and plot the He II/Lyα ratio against the C IV/Lyα ratio for individual spaxels for 4C 05.84 (Left) and 3C 9 (Right).We further distinguish pixels belonging to the three different regions of the CGM as discussed in text for each quasar.For 4C 05.84, we have region 4C0584-a (Cyan), region 4C0584-b (Red) and the region 4C0584-c (Purple) for 4C 05.84.Similarly, we have region 3C9-a (Cyan), region 3C9-b (Red) and region 3C9-c (Purple) for 3C 9. tion, which leads to a lower confirmation rate.Given telescope time and weather conditions we were only able to complete K-band observations on only 1 mask for each quasar, to target Hα, which is expected to be prominent for these galaxies, can only be observed for a fraction of sources around each quasar.For 3C 9, Hβ falls close to the edge of the atmospheric transmission, making it difficult to confirm any galaxies with faint Hβ and [O III] emission at other redshifts.Identified redshifts, lo-cations and properties of the extended dataset will be discussed in a future work.
To calculate the redshift of the group/cluster members, we first visually inspect each source's spectrum and define a boxcar region to extract a 1D spectrum.We fit each spectrum with a Gaussian to determine the centroid and σ for each emission line to determine the redshift z i of the member.For all cases, we have detection of multiple lines for the same source, and as such, the redshift is calculated using the line with the highest Signal-to-noise ratio.We then use the redshift of the quasar (z = 2.019 for 3C 9 and z = 2.32 for 4C 05.84 (Vayner et al. 2016)) to determine the velocity offset of the companion source from the systemic redshift using v i = c zi−z 1+z .The fitted σ gives us the resultant velocity dispersion of each source.
We determine the astrometry for each MOS-FIRE spectroscopically-confirmed source to extract a spatially-coincident spectrum in the KCWI data.We verify the MOSFIRE astrometry accuracy using the RA and Dec of the continuum source used in the science slit for each mask from the MOSFIRE pipeline header parameters.We additionally check for any optical distortions between the KCWI and MOSFIRE slitmasks by checking the pointing of the MOSFIRE slitmask on the quasar.We then calculated slit offsets for nearby objects from the quasar in MOSFIRE and KCWI WCS coordinates and found them to be in good agreement.We found that the distortion between the two instruments does not cause a significant offset in the astrometry (<0.1 arcsecond).We show the locations of the Figure 9.We use the angle ϕ determined using equation 5 and determine the major and minor axes (blue dashed line) for the Lyα nebula for 3C 9 (left) and 4C 05.84 (right).Using the right hand rule, the major axis is the X axis and the minor axis is the Y axis here.We also plot the radio jet contours and the jet axis and plot it on the same image (white dashed line).f Hα flux extraction likely contaminated by [NII] and must be treated as an upper limit.MOSFIRE slits indicating the spatial extent of detected emission lines in Figure 2.

KCWI and MOSFIRE Spectra for all sources
We plot all extracted 1D MOSFIRE spectra for all identified sources in this section.All the spectra are available in the online version of this journal for 4C 05.84 (3 Figures) and 3C 9 (5 Figures).We show all extracted spectra for 4C0584-MOS-1 in Figure 10 and 3C9-MOS-2 in Figure 11 as examples for the two Figure Sets.Identical figures for all the other sources can be found in the Appendix.Wherever possible, we have fitted identified lines with a Gaussian function.In some cases, the best fit requires us to fit a broad and narrow Gaussian component.In the case of 3C9-MOS-3 and 3C9-MOS-4, we have added a continuum fit to take into account any flux contamination from the quasar.Since Hα can contaminate flux extraction from [NII] and vice versa, we always fit two gaussians when extracting flux.For most sources where Hα and [NII] 6583.46Å is observed, we observe no contamination as the two lines can be visually distinguished.The only exceptions are 3C9-MOS-3 and 3C9-MOS-4 spectra, where we do see a blending between the two lines.In these cases, we were unable to distinguish the fluxes from Hα and [NII] emission lines.Thus, for 3C9-MOS-3, we considered the extracted flux for the [O III] and consider the same velocity and spatial extent to be true for Hα and report this as the Hα flux.We do not report any flux for [NII] for this object.We are unable to apply the same process to 3C9-MOS-4, so no Hα or [NII] flux is reported for this object.We note in Table 3 that this Hα flux could be affected by [NII] and must be treated as an upper limit.We overlay the MOSFIRE slit aperture on the KCWI emission line maps and extract a 1D spectrum for Lyα, He II and C IV corresponding to the location of the MOSFIRE slit for comparison.We plot 1 source here from each quasar for reference.The complete figure set (3 images for 4C 05.84 and 6 images for 3C 9) is available in the online journal.We show in Table 5 the spectroscopically identified MOSFIRE galaxies and the kinematically distinct regions of CGM they are associated with as seen with KCWI.This will be useful to keep in mind particularly when we discuss our results in section 6. Whenever we refer to the MOSFIRE identified galaxies and any properties associated with the ISM of that galaxy (e.g.star formation rate), we use the MOSFIRE identifier for that galaxy.Whenever we discuss the CGM properties of distinct regions around the quasar, we use the region identifiers established in Figure 6.

Star Formation Rates & Metallicities
We convert Hα fluxes into an estimation of star formation rates (SFR) from Murphy et al. (2011).We use the expression -SFR Hα M ⊙ yr −1 = 5.37 × 10 42 L Hα ergs s −1 (6) Wherever possible, we have corrected the Hα flux based on a calculation of the Balmer decrement.Using the attenuated to intrinsic line ratio R αβ assuming Case B Recombination at a temperature of 10,000 K, we calculate the value of E(B − V ) nebular using results from Calzetti (2001).We then convert this into E(B − V ) continuum using the conversion (Calzetti et al. 2000) - We then follow Steidel et al. (2014) to assume either the Galactic or the Small Magellenic Cloud (SMC) Extinction curve depending on the measured E(B-V), to obtain the Hα attenuation in magnitudes as given by - For sources where we do not have Hα data but only Hβ, we assume Case B Recombination nebular conditions with T=10,000 K giving an Hα/Hβ ratio of 2.86 to calculate Hα flux, which we then use to compute the SFR for each source.Since the Hβ line falls particularly close to low atmospheric transmission window for 3C 9 and close to sky lines in the H band for both quasar, we find that the calculated Hα/Hβ ratios can be as high as ∼ 6.These should not be taken to imply dust extinction but are likely due to a combination of relatively  low SNR for the Hβ line and the difficulty in carrying out accurate telluric calibration on the edge of the atmospheric transmission window.For each source we calculate metallicities using O3N2 = log(([O III]/Hβ)/([NII]λ6584/Hα)) and N2 = log([NII]λ6583/Hα) to calculate metallicites where data is available using calibration from Pettini & Pagel (2004).In cases where we do not detect [NII]at a 2σ limit, we have instead provided a limit.For objects where we do not have any Hα and [NII]λ6584 data, we instead use results from Nagao et al. (2006a) to provide an upper limit on the 12 + log(O/H) values using [O III]/Hβ.We estimate virial masses for detected MOS-FIRE sources that are spatially resolved.We choose the extent of the object as detected with MOSFIRE to be the total radius and the velocity dispersion measured by MOSFIRE to be the line-of-sight velocity.We then calculate the total mass by converting the line-ofsight velocity into 3d velocity for the source, assuming an isotropic velocity distribution.The extracted metallicities, SFRs and an estimation of the virial mass for each source is listed in Table 6.

Nebular Diagnostic Diagrams
We construct Baldwin, Phillips and Terlevich (BPT) diagrams (Baldwin et al. 1981) for the companion galaxies using MOSFIRE fluxes.We plot these values against star forming sequences indicated in Kewley et al. (2001) and Kauffmann et al. (2003), and the Seyfert-LINER separation as defined in Schawinski et al. (2007).We include the results from Kewley et al. (2013) for the evolution of the star forming sequence as a function of redshift, highlighting the sequences at the redshifts of our quasars.
To calculate the emission line ratios, we extract flux for an aperture size that fits all four emission lines spatially and spectrally with flux greater than 2σ.We then propagate measurement uncertainties in our calculation of the ratio.The results are plotted in Figure 12.We had sufficient spectral coverage to investigate line ratios for 5 MOSFIRE sources.We now address all 5 sources individually.Firstly, we notice that 3C9-MOS-3, which is the quasar host galaxy, is the only source where the observational uncertainties are small enough that we can definitively categorize it as an AGN.This is not surprising.However, all other sources have significant uncertainties in the calculated line ratios.Firstly, we consider the sources around 3C9, i.e. 3C9-MOS-2 and 3C9-MOS-5.Both of these sources lie on the star forming sequence.The question to consider is whether these can be ionized by an AGN given the large uncertainties.For 3C9-MOS-2, which is closer to the quasar, this is certainly a possibility.However, given that we see the stellar continuum from the galaxy in HST imaging, it is equally plausible that this galaxy is indeed on the star forming sequence.The same argument is even stronger for 3C9-MOS-5, as it is significantly further away from the quasar and detected in- dependently with Spitzer and HST.We conclude that these galaxies are likely on the star forming sequence.For 4C0584, the picture is less clear.We detect a strong continuum in NIRC2 imaging for 4C0584-MOS-1 but a much weaker component for 4C0584-MOS-2.While it does appear that both these sources are likely ionized by an AGN, there are important considerations here.Firstly, for 4C0584-MOS-1, the strong stellar continuum detection implies that it is possible that there is at least a combination of AGN and star forming activity that is causing the ionization of the galaxy.This seems less likely for 4C0584-MOS-2, which on sky appears to be further away from the quasar than 4C0584-MOS-1, but this could be due to on sky projection.The other complicating factor is that for 4C0584-MOS-1, the [NII] line flux is contaminated by a sky line.This explains the particularly large uncertainty in the [NII]/Hαratio calculation which would bring it in line with 4C0584-MOS-2, if the [NII] flux was strong.Given the emission line fluxes and their uncertainties, it seems likely that at least some part of the emission is powered by AGN photoionization.Since our calculated star formation rates for these galaxies have been derived using the nebular line fluxes, these rates should be treated as upper limits for these galaxies, as the true nebular emission due to star formation is a fraction of the observed flux.However, this interpretation does not affect our mass calculation of the system, which only relies on the observed positions and velocities of the companion galaxies.

Calculating the Dark Matter mass of the two systems
The identification of companion galaxies allows us to calculate the dynamical mass of the dark matter halo.
There are different approaches in the literature that calculate dark matter halo masses for a group/cluster of galaxies at comparable redshifts.Firstly, clustering strengths of galaxies in a group/cluster environment can be compared to simulated population of dark matter halos to estimate the halo mass.This is usually carried out by calculating galaxy-galaxy autocorrelation lengths, given a group of galaxies (Trainor & Steidel 2012;White et al. 2012).The drawback to this approach is that the robustness of the autocorrelation length calculation improves with the number of galaxies, and thus this method yields reliable results only with large number of galaxies.Secondly, one can use halo mass (M DM ) -stellar mass (M stellar ) relations to calculate the DM halo mass (Moster et al. 2010;Moster et al. 2018).This method has been validated by comparison with characteristic group luminosities using SDSS (Yang et al. 2007) and has subsequently used to calculate group masses at lower redshifts (Fossati et al. 2019).However, this method relies on accurate SED modelling, thus works best when the galaxies in question have imaging across a wide range of optical and infrared bands.Other works have utilized this technique to estimate DM halo masses at higher redshifts.Arrigoni Battaia et al. (2022) use this method to estimate the DM halo mass of a z ∼ 3 QSO environment and find a halo mass of 8.6 × 10 12 M ⊙ , the bulk of which comes from the QSO host galaxy DM mass.Similarly, Chen et al. (2021) find a DM halo mass of 6.4 × 10 12 M ⊙ for the Slug nebula around the radio quiet quasar UM 287 at z = 2.23.In both of these cases, the authors recognize the uncertainty in the calculations come largely from the estimation of the stellar masses of the galaxies  (Baldwin et al. 1981) for all sources detected at the redshift of the respective quasars using MOSFIRE.The star forming sequences from Kewley et al. (2001) and Kauffmann et al. (2003) are plotted to demarcate the star forming sequence.We include the sequence with redshift dependence for the two quasars as taken from Kewley et al. (2013), including the line demarcating AGNs from LINERs as taken from Schawinski et al. (2007).
in the environment.
In this work, we follow the procedure laid out by Tempel, E. et al. (2014) to calculate the dynamical mass of the environments.Chen et al. (2021) and Arrigoni Battaia et al. (2022) use this as an alternate method for their DM mass calculations and find good agreement with the estimates from M DM -M stellar relations.Given the velocity dispersion along line of sight to be σ LOS and assuming a virialized system, the three dimensional velocity dispersion is given by σ 3D = √ 3 σ LOS .Then, assuming an NFW profile (Navarro et al. 1997) for the dark matter halo, we can iteratively calculate the projected radius on sky and the corresponding M 200 .Having calculated the projected radius, the enclosed mass is given by - We obtain a projected radius of 123 kpc for 4C 05.84 using this method and a velocity dispersion of 352 km s −1 which gives a total mass of 3.5 × 10 12 M ⊙ .For 3C 9, we get a projected radius of 263 kpc and a velocity dispersion of 673 km s −1 which gives us a total mass of 2.77 × 10 13 M ⊙ .We now address a concern regarding the mass calculation for 4C 05.84.For both quasars, we have calculated the mass of the dark matter halos under the assumption that the emission lines traced by MOSFIRE are tracing emission from companion galaxies and not simply emission from the CGM or any gas blobs in the vicinity of the quasar host galaxies.We believe we are indeed tracing the velocities and locations of galaxies since these sources were selected based on imaging of their stellar continuum using either HST F160W or as seen with Spitzer.However, for 4C0584-MOS-3, while the source was identified on the basis of continuum emission with Spitzer IRAC imaging, the source was close enough to the quasar such that the PSF from the quasar blended with the source.NIRC2 imaging of the quasar does not show a stellar continuum at the location of 4C0584-MOS-3.While it is possible that this is due to the sensitivity of the NIRC2 exposures, we consider the consequences if 4C0584-MOS-3 is indeed tracing the CGM and not stellar emission from a companion galaxy.When we remove 4C0584-MOS-3 from our mass calculation, we calculate the dark matter halo mass of the system to be 5 × 10 12 M ⊙ , larger than our original estimate.This is because MOS-3 does not serve as an outlier in physical separation from the rest of the group members, and has a velocity relatively close to the mean velocity of the system.As a result, when excluded from the calculation, it does not greatly affect the extent of the dark matter virial radius, but the expected velocity dispersion does increase, resulting in a net increase dark matter halo mass.However, since a virial mass calculation of the source 4C0584-MOS-3 indicates a mass ∼ 10 10 M ⊙ , it is reasonable to assume this compact area could originate from star formation within a galaxy.Thus, for purposes of estimation of growth of these dark matter halos as discussed in Section 6.2, we assume the originally calculated mass as a conservative estimate with the caveat that the calculated mass growth must be seen as a lower limit.

CGM and companion galaxies
Lyα is a resonant emission line with a large optical depth.Thus the observed spatial profile does not necessarily coincide with the ionizing region.He II emission, on the other hand, arises from a much more localized environment.We detect multiple He II and C IV clouds with either a high-velocity offset or a large radial separation from the quasar -or both -using KCWI, which indicates the presence of other galaxies in the environment.With MOSFIRE follow up we confirmed the presence of the companion galaxies by identifying Hα, Hβ and [O III] emission lines.Knowing the locations of the companion galaxies, we can also confirm that the peak in surface brightness in He II away from the quasar host galaxy as seen in Figure 5 for both 3C 9 and 4C 05.84 in He II originates from companion galaxies.The case of Lyα however, is more complicated.While we do detect a peak in Lyα emission indicative of substructure at the radial distance of companion galaxies around 3C 9 and 4C 05.84, in the case of 3C 9 at least, it is clear from Figure 3 surface brightness profile that the Lyα emission peak does not necessarily coincide with the emission from the companion galaxies.In fact, by plotting the Lyα emission, locations of companion galaxies and the locations of radio jets together as seen in Figure 2, we see that for 4C 05.84, the Lyα surface brightness peak in the region 4C0584-c happens to coincide with the direction of the radio jet and the companion galaxies.However, for 3C 9, the Lyα emission seems to be coincident with the radio jets rather than companion galaxies.
For 4C 05.84, the He II emission in 4C0584-c coincides with C IV emission as well as Hα, Hβ and [O III] emission observed using MOSFIRE.The large spatially resolved extent of the He II and C IV in 4C0584-c indicates that these are part of the companion galaxies 4C0584-MOS-1 and 4C0584-MOS-2.
Regarding 3C 9, we observed He II emission away from the quasar in region 3C9-c but no spatially resolved C IV emission in that region.But we detect Hα, Hβ and [O III] coincident with the He II emission.If we assume that the quasar is responsible for photoionizing regions 3C9-a and 3C9-b, this implies the ionizing luminosity must be sufficient to cause C IV emission in 3C9-c.The absence of C IV emission thus indicates the presence of lower gas metallicity in region 3C9-c.This finding is supported by Figure 7, which shows the He II/Lyα ratio against the C IV/Lyα ratio for all spaxels in the KCWI field of view.The figure demonstrates that the absence of C IV detection in 3C9-c is not due to observational sensitivity.This is particularly interesting as this is consistent with the observed [NII]/Hα ratio for the galaxy which indicates a low metallicity.

Proto group/cluster mass growth
To estimate the growth of these dark matter halos, we calculate the growth rate using two independent approaches.First, we use analytic relations derived using the extended Press-Schechter formalism to calculate the growth rate of the dark matter halos (Correa et al. 2015a,b,c).Second, we compare the dark matter masses to the merger trees constructed using the joint set from Millenium and Millenium-II simulations (Fakhouri et al. 2010).Using the analytic Press-Schechter formalism, we use WMAP9 cosmological parameters to estimate the mass growth of the halos.We find that 4C 05.84 is accreting mass at a rate of approximately 2.3 × 10 3 M ⊙ yr −1 at z = 2.32 and will grow to a mass of 2.2 × 10 13 M ⊙ by present day.The same approach gives a mass accretion rate of 2 × 10 4 M ⊙ yr −1 for 3C 9 at z = 2.02.We calculate 3C 9 will grow to a mass of 2.35 × 10 14 M ⊙ by present day.
We compare these results to the halo merger trees constructed using the joint data set from the Millenium and Millenium-II simulations.Fakhouri et al. (2010) found an analytical fit to the mass accretion rate for the simulated halo merger trees given by - Starting with a range of DM halo masses at presentday, we calculate the progenitor mass by integrating the mass accretion rate as a function of redshift.We find the DM halo mass at present-day matches the dynamical mass of the quasar systems as calculated in Section 5.4 at the redshift of the quasar.Using this approach, we calculate that 4C 05.84 will grow to a mass of 2.3 × 10 13 M ⊙ and 3C 9 will grow to a mass of 2.15 × 10 14 M ⊙ by present-day, in reasonable agreement with our extended Press-Schechter calculation.This implies that the 4C 05.84 system will grow to a mass 10 times more massive than the local group (Benisty et al. 2022), making it a large group.Whereas 3C 9 will grow to a mass comparable to the dynamical mass estimates of Abell 2495 (2.8 ± 0.7 × 10 14 M ⊙ ) or MKW3S (2.3 ± 0.6 × 10 14 M ⊙ ) clusters (Sifón et al. 2015).This implies the 3C 9 system is in fact a protocluster environment.Fakhouri et al. (2010) also calculate and fit the mean number of mergers a DM halo of mass M is expected to undergo between redshift of z and present day, with progenitor mass ratios in the range of ξ = 0.1 and ξ = 0.3.Based on their results, DM halos with a mass of 4C 05.84 had an average of 0.9 mergers between z = 2.32 and today, whereas for 3C 9 it was an average of 1 merger between z = 2.02 and now.Based on the virial mass estimates for the group/cluster members as listed in Table 6, all group/cluster members detected fall within the expected mass range to be merger candidates.If we treat the relative velocity between group/cluster members and the quasar as a velocity of approach, we can calculate the dynamical time for the galaxies to merge.The maximum time is ∼140 Myrs for the 3C9-MOS-5 source to merge with 3C 9, assuming the true separation is equal to the projected on-sky separation.This is likely an underestimate of the distance and therefore the merger may occur later.However, even if the projected distance is underestimated by a factor of 10, all the companion sources detected have sufficient time compared to estimated dynamical time to merge with the quasar host.The number of mergers thus would be 2-3 for each quasar system, which is higher than the expected number of mergers seen with the Millenium halo merger trees.While these two estimates differ by a factor of 2 or 3, the simulations usually calculate these as an average across a large number of merging systems.Given the stochastic nature of individual merger systems combined with small number statistics means we do not consider this result significantly different from the simulations.
The mass growth estimates calculated here rely on the initial mass of the DM halo, which has been calculated using the observed companion galaxies' positions and relative velocities with respect to the quasar.However, since it is possible there are galaxies further away from the quasar which were not detected, the calculated dynamical mass should be seen as a lower limit, which implies the same is true for the calculated mass accretion rates and the present day masses of these systems.We would like to stress that these calculations are approximations and can change based on new or improved data and that these masses must be treated as lower limits.We also caution against a simple interpretation of these structures as a protogroup or protocluster.We have chosen to demarcate the definition of a cluster as a bound structure that evolves to z = 0 with a minimum mass of 10 14 M ⊙ , consistent with literature (Overzier 2016).However, galactic structures lie on a mass spectrum and we would like to emphasize that with the aforementioned definition of a cluster and given our calculations, 4C 05.84 would be a large group whereas 3C 9 will be a small cluster by z = 0. .We construct the cylindrical projection of the CGM around the two quasars by plotting the velocity with respect to the quasar against the projected distance from the quasar using data from Moment maps in Figures 3 and 4. We only present datapoints at least 7 kpc away from the quasar since the moment maps obtained from the KCWI data may contain residuals from PSF Subtraction within this region.We can compare these plots to the cylindrical projection presented in Chen et al. .
study the CGM in aggregate and found a simple two component model worked best for their observations.This two component model has an inner and outer component.The inner CGM extends up to the inner 50 kpc and consists of outflows with velocities up to 600 km s −1 , whereas the outer CGM extends to 200 kpc with significantly lower velocities.Theoretically, the two component model implies that the inner CGM is the part of the CGM that is closer to the galaxy and directly encounters any galactic scale outflows, whereas the outer CGM is a larger, more diffuse body of gas.
To study the signatures of a potential two component model with our data, we create a scatter plot of velocity vs. distance from quasar as shown in Figure 13 with the three emission lines we detect using KCWI, i.e.Lyα, He II and C IV.To generate Figure 13 we use data in our moment 1 maps from Figures 3 and 4 with the calculated the on-sky projected distance of each spaxel from the quasar.We then exclude any spaxels that are within the inner 0.9 arcseconds for the quasars since these spaxels are susceptible to residuals from PSF subtraction.At the redshift of the quasars, this distance translates to about 7 kpc.We therefore are able to probe distances larger than 7 kpc and have the ability to resolve a potential inner CGM.Chen et al. (2020) created a similar plot but instead used the probed column densities to create a cylindrical projection of the CGM in the aggregate by combining all of their quasar sightlines.While they are able to probe the apparent optical depth of the hydrogen clouds, we do not have that information.
We find the Lyα emission velocity is centered around the quasar redshift for 3C 9, whereas for 4C 05.84 the velocity is offset from the quasar center.Yet, given the resonant nature of Lyα, it is difficult to deduce any evidence of coherent outflows close to the quasar, so we are only able to observe the "Outer" CGM using Lyα.However, He II and C IV provide further information about the kinematic structure of the CGM, including signatures of outflows in the inner CGM.
For 3C 9, we detect traces of outflows within the inner 50 kpc with velocities exceeding 500 km s −1 and approaching approximately 900 km s −1 .The C IV and He II emission coincident within the inner 40 kpc are associated with the CGM of the quasar host galaxy.For 3C 9, the He II emission between 40 and 80 kpc from the quasar is associated with the fringes of the detected Lyα "Outer" CGM velocity structure as seen in Figure 13.We know from our MOSFIRE observations that the He II in region 3C9-c is associated with companion galaxy 3C9-MOS-2.The fact that the He II kinematics are on the fringes of the outer CGM highlights the stark velocity difference between the CGM around the quasar host galaxy and 3C9-MOS-2.We note that this may be the signature of the CGM from the infalling galaxy (3C9-MOS-2) starting to align with the larger CGM of the quasar host galaxy.
For 4C 05.84, we detect He II and C IV coexisting with two distinct regions within the inner 40 kpc.The inner 20 kpc of 4C 05.84 C IV and He II correspond to the quasar host galaxy, whereas the secondary structure from 20 to 40 kpc corresponds to the companion galaxies MOS-1, MOS-2 and MOS-3.We note that the observed Lyα emission profile for 4C 05.84 in Figure 13 has some peculiar features.Firstly, the observed Lyα emission close to the quasar actually does not converge upon the redshift of the quasar but at a redshifted velocity of ∼ 600 km s −1 for z = 2.32.While we have used the value of z = 2.32 throughout this paper from Vayner et al. (2021c), 4C 05.84 has earlier been reported to have z = 2.323 (Barthel et al. 1990).If taken to be the redshift of the quasar, the observed CGM emission would change the velocity offset to ∼ 300 km s −1 .The other noteworthy observation is the large difference in velocities between the "inner" CGM and the Lyα emission 40-80 kpc away where we see a systematic blueshift in Lyα emission, offset by as much as 1000 km s −1 compared to the inner CGM velocity.sWe now compare the observed two component structure for the two quasars 3C 9 and 4C 05.84.We notice that while for 3C 9, the larger Lyα emission neatly converges towards the redshift of the quasar, for 4C 05.84, the emission close to the quasar seems to be offset from the mean velocity of Lyα emission for distances larger than 20 kpc.This indicates the host galaxy may have experienced a shift in velocity compared to the larger CGM around it in the past.This is interesting since Vayner et al. (2021c) did not detect any signatures of a merger in diffraction limited observations of the host galaxy ISM kinematics.Additionally, the large velocity offset between the innermost and outer parts of the CGM in 4C 05.84 is reminiscent of the He II emission joining the outer CGM in 3C 9 between 40-80 kpc as seen in Figure 13.If the CGM is indeed a two component model where the outer halo is largely confined to ±500 km s −1 for distances larger than 10-20 kpc, then this Lyα emission could be indicative of gas accreting on to the outer CGM from the cosmic web.
In summary, we detect signatures of outflow consistent with those expected from the inner and outer CGM for both 3C 9 and 4C 05.84.We detect potential outflows from the inner CGM using He II emission, whereas the outer CGM is detected and studied using Lyα, He II and C IV.

Source of CGM ionization
We use the observed Lyα, He II and C IVemission profiles to discuss the source of ionization powering the CGM emission.Figure 14 shows the He II/Lyα, C IV/Lyα and C IV/He II ratios as a function of radial on-sky separation from the quasar.We have only plotted spaxels at a distance greater than 8 kpc to remove any spaxels with PSF subtraction residuals.While He II and C IV have been used to distinguish AGN ionization from shocks in the ISM, they require the C III] line (Villar-Martin et al. 1997;Nagao et al. 2006b;Feltre et al. 2016;Humphrey et al. 2019).Instead, we use the observed He II/Lyα and C IV/Lyα ratios to consider the source of ionization for the observed CGM profiles around these two quasars.Firstly, we note that the observed He II/Lyα ratios for both quasars are less than 0.15 for all observed spaxels with significant detection.Cantalupo et al. (2019) obtained theoretical limits on He II/Lyα ratios of 0.23 and 0.30 for Case A and Case B recombination respectively at T= 2 × 10 4 K, for fully ionized He II, suggesting that the He II is not fully ionized.Secondly, we note that for Regions 3C9-a, 3C9-b, 4C0584-a and 4C0584-b, corresponding to CGM gas directly associated with the quasar host galaxy, the observed He II/Lyα and C IV/Lyα ratios, wherever data is available, decrease with greater on-sky separation from the quasar.Comparing our results to photoionization models in Humphrey et al. (2019), we find that the decreasing ratios are consistent with a decrease in log(U).A radially decreasing log(U) parameter is consistent with quasar photoionization.Regions 3C9-c and 4C0584-c, which are likely associated with companion galaxies, do not show radially declining ratios.Region 4C0584-c shows a peak at ∼ 32 kpc from the quasar for the He II/Lyα ratio, whereas 3C9-c shows a radial decrease, followed by an increase.This could be explained by line of sight projection effects.If we assume that the CGM around the companion galaxies is ionized by the quasars and the CGM and companion galaxies are extended along the line of sight, then the radial distance from the quasar will change significantly, compared to the on-sky projected separation.For these regions, we suggest log(U)< 2.4 in this region, whereas no constraints can be placed on the metallicity based on this line ratio alone.This is again consistent with quasar photoionization.However, since 4C0584-c and 3C9-c are at comparable on-sky projected distances from the quasar, the lack of C IV detected in 3C9-c could indicate a significantly larger distance from the quasar along the line of sight, resulting in significantly lower log(U) parameter value.The other explanation for a lack of C IV detection is if the observed gas in Region 3C9c is an infalling subhalo around the companion galaxy, the companion galaxy has not undergone significant star formation prior to infall, and thus has not formed and ejected metals into the CGM, resulting in a low metallicity.However, confirmation of this scenario would require additional diagnostics for the CGM.Lastly, we consider the biconical ionization around both quasars as seen in He II and C IV. Since these likely indicate quasar photoionization cones, we consider the implications for the larger Lyα nebula.The presence of these biconical regions around both quasars, and the presence of the extended regions 4C0584-c and 3C9-c within the opening angles of these cones strongly indicate C IV and He II emission in these regions being powered by quasar photoionization.The question then arises: Is this also true for the Lyα emission?If only the inner CGM is directly photoionized by the quasar, this would suggest that recombination may not be the only significant mechanism powering Lyα emission.Further confirmation of this scenario would require C III] observations with additional radiative transfer modelling for these systems.We also note the important caveat that radio jets can affect the observed lines, since they can modify the gas densities and kinematics in these systems.

SUMMARY
We have presented results for two radio-loud quasars, 3C 9 and 4C 05.84.By combining optical observations of the CGM with near-infrared spectroscopy of companion sources, we have comprehensive picture of the environment around these quasars.While previous studies have investigated diffuse gas around radio-loud quasars at z ∼ 2 using long slit spectroscopy (Shukla et al. 2022), or explored Lyα nebulae around radio-loud quasars at z = 3 (Borisova et al. 2016;Arrigoni Battaia et al. 2019), our work stands out as one of the initial multiwavelength analysis of Lyα nebulae z = 2 radio-loud quasars with IFU observations.We have uniquely identified companion galaxies that potentially contribute to observed Lyα nebulae emission and have conducted a comparative analysis of the nebulae's orientation in re-lation to the radio jets.We summarise our findings as follows: 1.For both quasars, we detect large Lyα nebulae, projected on sky to be 120 kpc across, with spatially resolved substructure down to a sensitivity of 5 × 10 −20 erg s −1 cm −2 arcsec −2 .
2. We detect He II and C IV nebulae around these quasars about 40-50 kpc across as projected on sky.While we detect these nebulae immediately around the quasar, we also detect ∼ 20 kpc diameter kinematically distinct regions 15-30 kpc away from both quasars.
3. The He II nebulae around both quasars show a biconical shape, indicating that they are being powered due to ionization by the quasar.The shape of the nebulae traces this ionization cone which further strengthens the fact that the detected Lyα and He II nebulae immediately around the quasar are aligned with their observed radio jets.Observed C IV/Lyα and He II/Lyα ratios additionally show that the CGM emission is predominantly powered by quasar photoionization.This assertion is strengthened by the biconical morphology of He II and C IV emission seen around both quasars, indicative of an ionization cone.
4. We detect Hα, Hβ and [O III] emission from the companion galaxies in the environment around each quasar using MOSFIRE observations.For 3C 9, we detected Hα and [O III] coincident with the kinematically distinct southern He II region 3C9c indicating the presence of a companion galaxy.We also detect Hα emission in a galaxy about 172 kpc away from the quasar.
5. The observed radial profile for Lyα emission around these two quasar host galaxies deviates from a smooth gradual decline.These surface brightness deviations align with the locations of Lyα, He II and C IV emission from the CGM likely associated with the companion galaxies.This association is confirmed by both the spatial and velocity match of the observed Hα, [O III] and Hβ emission.Therefore, the observed substructure in Lyα, nebular emissions around highredshift quasars may serve as an indicator of the presence of companion galaxies.
6. Confirmed companion galaxies around 3C 9 shows this source is in active cluster formation.The mass of the 3C 9 cluster progenitor is estimated to be 2.7 × 10 12 M ⊙ .Confirmed companion sources around the 4C 05.84 were similarly used to calculate the mass of the group progenitor to be 3.5 × 10 12 M ⊙ .We estimate that the total mass of the 4C 05.84 system will grow to about 2.3 × 10 13 M ⊙ by present day whereas 3C 9 will grow to a mass of 2.15 × 10 14 M ⊙ by present day.Assuming that these structures are not yet gravitationally bound, this makes the detected structure around 4C 05.84 a protogroup and that around 3C 9 a protocluster.

Figure 1 .
Figure 1.(LEFT) Overdensities measured around the quasars 3C 9 (Top) and 4C 05.84 (Bottom) from archival Spitzer data.The 4.5 µm IRAC image centered on the quasar (circled in red) is shown in both cases.We perform a color cut [3.6]AB− [4.5]AB > −0.1 (Papovich 2008) to select sources with z > 1.3 (circled in green).We plot 1 arcmin and 2 arcmin circles centered on the quasar in dashed red and blue lines respectively.(RIGHT)The surface density of sources (in sources arcmin −2 ) against separation from the quasar (in arcseconds).The vertical dashed red line at 60 ′′ is shown to indicate the number density of sources used for comparison against the SpUDS blank field number density ΣSpUDS = 8.3 arcmin −2 in Wylezalek et al. (2013).Both quasars show a factor of ∼ 2 increase in the number of sources at this radius compared to the field.

Figure 3 .Figure 4 .
Figure 3.A PSF-subtracted image of the Lyα (Left column), He II (Middle column) and C IV (Right Column) derived properties for 3C 9.The top row is the surface brightness, middle row is the moment 1 map, and bottom row is the moment 2 map.All figures have an on-sky position angle of 0. The systemic redshift used to calculate the moment maps is used from OSIRIS measurements in Vayner et al. (2016).The grey dashed contour in He II and C IV Surface Brightness figures denotes a Lyα isophote at a surface brightness of 10 −17 erg s −1 cm −2 arcsec −2 .C IV emission immediately around the quasar, and significant He II emission around 20 kpc from the quasar.However, while we see C IV emission far away from the quasar for 4C 05.84 in 4C0584-c, this is not the case for 3C 9.A comparison with the moment 1 maps indicates that in both quasars, the surface brightness ratio is higher in the region with the relatively blueshifted ve-

Figure 5 .
Figure 5. Radial surface brightness profiles of Lyα, C IV and He II derived from 2d surface brightness maps: see Figures 3and 4for 4C 05.84 (Left) and 3C 9 (Right).We center the surfaces on the quasar and construct successively larger annular regions to extract the azimuthally averaged surface brightness.We omitted the innermost 2 pixels, which corresponds to 0.6 ′′ corresponding or approximately 5 comoving kpc to avoid any contamination from PSF subtracted residuals.

Figure 6 .
Figure6.Emission line ratios constructed from Figures3 and 4. We divide C IV and He II surface brightness maps by the Lyα maps to obtain the surface brightness ratios presented here.Three distinct regions are identified based on their spatial locations.3C 9 shows a biconical outflow in C IV and He II with the northern cone denoted as region 3C9-a (outlined in cyan) and a southern cone denoted as region 3C9-b (outlined in red).We also see a large Southern cloud in He II (outlined in purple) denoted as region 3C9-c.For 4C 05.84, we see the biconical shape in C IV emission showing a Northeastern cone denoted as region 4C0584-a (outlined in cyan) and a southwestern cone (outlined in red) denoted as region 4C0584-b.We don't detect significant He II emission in this region.We also see evidence of a larger southeastern cloud denoted as region 4C0584-c (outlined in purple) seen both in C IV and He II.
Figure7.We used the surface brightness ratio maps in Figure6and plot the He II/Lyα ratio against the C IV/Lyα ratio for individual spaxels for 4C 05.84 (Left) and 3C 9 (Right).We further distinguish pixels belonging to the three different regions of the CGM as discussed in text for each quasar.For 4C 05.84, we have region 4C0584-a (Cyan), region 4C0584-b (Red) and the region 4C0584-c (Purple) for 4C 05.84.Similarly, we have region 3C9-a (Cyan), region 3C9-b (Red) and region 3C9-c (Purple) for 3C 9.

Figure 8 .
Figure8.We plot the asymmetry α against the total area of the 2σ isophote for the two quasars 3C 9 and 4C 05.84.For comparison we plot these against the radio-loud and radio-quiet quasars from ArrigoniBattaia et al. (2019) at z ∼ 3 and from the z ∼ 2 quasars inCai et al. (2019).The cyan markers for 3C 9 and 4C 05.84 represent datapoints if we only consider pixels with a minimum surface brightness limit of 2 × 10 −18 erg s −1 cm −2 arcsec −2 .

Figure 10 .
Figure10.Figure showing all spectra for the source 4C 05.84 -MOS-1 from KCWI and MOSFIRE data.The X-axis for all spectra shows the velocity with respect to the quasar's redshift in km s −1 .For the top row, the Y-axis shows the extracted 1D spectrum in erg s −1 cm −2 , whereas for the bottom row, the Y-axis is in relative units.The top row contains 1D spectra extracted from KCWI Surface Brightness plots as shown in Figure 4.The red dashed line indicates the best fit gaussian for each emission line whereas the propagated scaled uncertainties for the measurements are shown in the y axis split plot shown in red.Each emission line shows an inset of the KCWI Surface brightness image with a rectangular slit (blue) corresponding to MOSFIRE emission line detection showing the location where the KCWI 1D spectrum was extracted from.The bottom row consists of MOSFIRE detected Hα, Hβ and [O III] emission lines with the 2D spectra on top and the extracted 1D spectrum between the horizontal boxcar region (shown with solid black horizontal lines in the 2D spectrum) on the bottom.The red dashed line indicates the best fit gaussian whereas the purple dotted line indicates the peak sky noise.The complete figure set (3 images) is available in the online journal.

Figure 11 .
Figure 11. Figure showing all spectra for the source 3C 9 -MOS-2 from KCWI and MOSFIRE data with all axes and labels similar to Figure 10.The complete figure set (5 images) is available in the online journal.

Figure 12 .
Figure 12.Diagnostic diagram (log([O III]/Hβ) vs. log([NII]/Hα))(Baldwin et al. 1981) for all sources detected at the redshift of the respective quasars using MOSFIRE.The star forming sequences fromKewley et al. (2001) andKauffmann et al. (2003) are plotted to demarcate the star forming sequence.We include the sequence with redshift dependence for the two quasars as taken fromKewley et al. (2013), including the line demarcating AGNs from LINERs as taken fromSchawinski et al. (2007).

6. 3 .
Figure13.We construct the cylindrical projection of the CGM around the two quasars by plotting the velocity with respect to the quasar against the projected distance from the quasar using data from Moment maps in Figures3 and 4. We only present datapoints at least 7 kpc away from the quasar since the moment maps obtained from the KCWI data may contain residuals from PSF Subtraction within this region.We can compare these plots to the cylindrical projection presented inChen et al. (2020)

Table 1 .
At the quasar redshifts, we detect Hα in the K band and Hβ, O[III] 5007 Å and O[III] 4959 Å in the H band. Our target selection relies on a Spitzer color cut as described in Section 2. Ta-

Table 2 .
Redshift and Velocities of spectroscopically-confirmed group/cluster members
e Flux Extraction affected by Quasar residuals.

Table 5 .
CGM regions around the two quasars and the associated MOSFIRE galaxies Quasar System CGM Region MOSFIRE Identified Galaxies Transition used for Definition

Table 6 .
Group/cluster Member properties Calculated assuming Hα flux equal to the [O III] flux.b Calculated using Hβ and assuming Case B Nebular conditions.