The XXL Survey L. Active galactic nucleus contamination in galaxy clusters: Detection and cosmological impact

X-ray observations of galaxy clusters are impacted by the presence of active galactic nuclei (AGNs) in a manner that is challenging to quantify, leading to biases in the detection and measurement of cluster properties for both astrophysics and cosmological applications. We detect and characterise clusters contaminated by central AGNs within the XXL survey footprint and provide a systematic assessment of the cosmological impact of such systems in X-ray cluster samples. We introduce a new automated class for AGN-contaminated (AC) clusters in the XXL source detection pipeline. The majority of these systems are otherwise missed by current X-ray cluster-detection methods. The AC selection is also effective in distinguishing AGN and cool-core presence using supplementary optical and infrared information. We present 33 AC objects, including 25 clusters in the redshift range, $0.14 \leq z \leq 1.03$, and eight other sources with significantly peaked central profiles. Six of these are new confirmed clusters. We computed the missed fraction of the XXL survey, which is defined as the fraction of genuine clusters that are undetected due to their centrally peaked X-ray profiles. We report seven undetected AC clusters above $z>0.6$, in the range where X-ray cluster detection efficiency drops significantly. The missed fraction is estimated to be at the level of $5\%$ for the 50 square-degree XXL area. The impact on cosmological estimates from missed clusters is negligible for XXL, but it produces a tension of $\sim 3\sigma$ with the fiducial cosmology when considering larger survey areas. Looking towards surveys such as eROSITA and \textit{Athena}, larger areas and increased sensitivity will significantly enhance cluster detection, and therefore robust methods for characterising AGN contamination will be crucial for precise cluster cosmology, particularly in the redshift $z>1$ regime.


Introduction
The growth of galaxy clusters from the highest primordial density peaks makes them indispensable probes for the measure-Based on observations obtained with XMM-Newton, an ESA science mission with instruments and contributions directly funded by ESA Member States and NASA.ment of cosmological parameters.The number of clusters observed as a function of mass and redshift is extremely sensitive to the underlying matter and energy content of the Universe.However, since galaxy clusters are not detected according to their total mass, but rather via observable mass proxies, the precise modelling of selection effects is a crucial component to ensure an accurate sampling of clusters over cosmic time.One key ad-vantage for X-ray cluster surveys, which detect diffuse emission from the intracluster medium (ICM), is that they are significantly less sensitive to projection effects, since the X-ray surface brightness is more centrally concentrated than the galaxy distribution of the cluster.This has allowed for the creation of many effective cluster catalogues (e.g.Ebeling et al. 1998;Böhringer et al. 2000;Mehrtens et al. 2012;Adami et al. 2018, hereafter XXL Paper XX), as well as more recent samples (Klein et al. 2019;Brunner et al. 2022), including those that go to redshifts of z > 1 (e.g.Willis et al. 2013;Trudeau et al. 2020).Despite the efficacy of X-ray cluster searches, approximately 90 percent of sources in X-ray surveys are point-like objects, of which the majority are active galactic nuclei (AGNs).Sufficient angular resolution can allow one to distinguish between clusters and AGNs, but this is harder at intermediate to high redshifts, where the extent of cluster emission becomes comparable to the point spread function (PSF) of most X-ray missions (e.g.FWHM 6 on-axis for XMM-Newton).As a consequence, AGNs may be misclassified as clusters and vice versa (Donahue et al. 2020;Bulbul et al. 2021).Moreover, galaxy clusters may be contaminated by X-ray emission from an unresolved AGN within or along the line of sight.Famously, the Phoenix cluster at z = 0.597 was first misclassified as an X-ray point source in the ROSAT Bright Source Catalogue (Voges et al. 1999) due to the presence of a bright AGN embedded in the cluster centre.In more recent work by Logan et al. (2018, hereafter XXL Paper XXXIII), an XXL sample of cluster candidates (z > 1) with associated Chandra observations revealed the presence of significant contamination from previously unresolved AGNs in approximately one third of the sample.It is also difficult to distinguish between AGNs and cool-cores in such systems due to the similarity in their X-ray surface brightness profiles (particularly in the inner 10-30 kpc region, see Fabian 1994).While consequences are less drastic for nearby clusters where the XMM PSF is compensated by the low redshift, this illustrates the importance of the subject well.
Modelling the impact of AGN contamination is important in the context of the XXL survey (Pierre et al. 2016, hereafter XXL Paper I).This is the largest XMM programme totaling ∼ 7Ms.It covers two extragalactic areas of 25 deg 2 each at a point-source sensitivity of ∼ 6 × 10 −15 erg s −1 cm −2 in the [0.5-2] keV band (completeness limit).Given that one of the survey's key goals is to serve as a pathfinder for future wide-area X-ray missions such as Athena for the next decade, the accurate selection of galaxy clusters is a necessary aspect, especially given that AGN density in clusters increases with redshift (e.g.Martini et al. 2013;Bufanda et al. 2017;Krishnan et al. 2017;Koulouridis et al. 2018b).AGN contamination within X-ray cluster surveys is typically addressed statistically by using realistic models of clusters, field AGNs, and AGNs embedded or projected onto clusters to calibrate the selection function (e.g.Käfer et al. 2020), but future surveys will likely need to employ cosmological hydrodynamical simulations in which AGNs and cluster evolution are treated self-consistently (see Biffi et al. 2018;Koulouridis et al. 2018a;Zhang et al. 2020).Unfortunately, there remains a lack of observational data on which to base such models, motivating the work presented in this paper.The final XXL data release aims to have approximately 400 cluster candidates of which AGN contamination may constitute a significant fraction.Looking forwards, the eROSITA all-sky X-ray survey will likely detect 10 5 clusters (Merloni et al. 2012) together with more than three million X-ray AGNs.Therefore, to obtain large X-ray cluster samples with sufficient purity, an automated method is required to select clusters with point source contamination.
This work presents a systematic search for the presence of AGN contamination within or projected onto X-ray-selected clusters.We applied a pipeline-driven classification blindly to all significant detected objects within the full XXL survey footprint; therefore, this work also delivers the first estimate of the level of AGN contamination over the redshift range of the XXL cluster sample.The outline of the paper is as follows.In Section 2 we describe the simulations used to model AGN-contaminated (AC) clusters in X-ray data.In Sections 3 and 4 we state the selection criteria for AC objects and their selection function.Section 5 describes the properties of the AC sample on the latest XXL dataset, including redshift estimates and multi-wavelength methods of confirmation.Section 6 details the X-ray properties of the AC sample.In Section 7, we estimate the missed fraction within XXL and its consequences for the final cosmological analysis of XXL and other X-ray surveys.We summarise our results in Section 8. Throughout the paper, unless otherwise stated, we assume a WMAP9 cosmology with Ω M = 0.28, Ω Λ = 0.72, and H 0 = 70 km s −1 Mpc −1 .

Injections into simulated XMM observations
We performed realistic Monte Carlo image simulations of XMMlike observations (hereafter pointings) to assess the detection threshold of clusters with central point source contamination using the InstSimulation software (Valtchanov et al. 2001).Softband XMM pointings were produced from scratch using a combined exposure time of 10 ks (see Figure 1).Two background components -the non-resolved vignetted AGN photon background and the unvignetted, uniform particle background -were added according to Read & Ponman (2003).These simulations faithfully reproduce the characteristics of the three EPIC detectors and have been used to characterise the cluster selection function of the XXL and X-CLASS surveys (see Pacaud et al. 2006;Koulouridis et al. 2021;Garrel et al. 2022, hereafter XXL Paper XLVI).
In order to model the detection differences for AGNcontaminated clusters, we first modelled "pure" uncontaminated clusters according to a single-beta profile where the core radius r c is measured in arcseconds, and a fixed value of β = 2/3 is used throughout.The total count rate in the soft [0.5-2] keV band and core radius were varied as shown in Table 1.The clusters were populated in random positions within three off-axis shells (0-5 , 5-10 , 10-13 ) measured from the XMM aimpoint -the number of clusters per shell was adjusted according to its core radius to minimise the occurrence of overlaps between sources.Altogether 850 simulations of pure clusters were rendered, with 5900 clusters simulated (based on the breakdown of clusters according to Table 1).
The simulations for clusters with point-source contamination were produced identically, with the addition of a point source placed in the centre of the cluster.We used three flux ratios for the contamination level: 0.25, 0.5 and 1, i.e.where the central point source had one quarter, half, or the same count rate of the cluster in the soft band.The total rate in this instance is the sum of both the central point and cluster count rates.The

XMM pipeline processing
All simulated sources were then processed through the latest version of the XXL source detection pipeline, which consists of a three-step process.Soft X-ray band observations were created and subsequently filtered using the wavelet decomposition method described in Starck & Pierre (1998).This technique is considered to be optimal for filtering X-ray images that contain few photon counts and Poisson noise, and has proven effective for cluster detection in the regime of short exposure times.Secondly, SExtractor (Bertin & Arnouts 1996) was used to detect sources within the inner 13 of the field to avoid border effects.
The background level was iteratively estimated using 3σ clipping, and a full background map was constructed by bicubic spline interpolation.While the simulated background is known, we performed this step to match the processing of the real XXL data.An isophotal analysis was then performed to determine the X-ray centroid position, brightness and shape within a flexible elliptical aperture.Finally, these parameters were inputted into the Xamin maximum likelihood fitting routine that applies several source models on the soft band photon image.For a detailed description of the individual model fits, we refer the reader to Faccioli et al. (2018, hereafter XXL Paper XXIV), however, we provide a self-contained description of the relevant models below.The pnt model is a precise point spread function (PSF) model for point-like sources.The ext model is a spherically symmetric β model for pure extended sources (Cavaliere & Fusco-Femiano 1976).Finally, the epn model is a β model superposed to a central PSF for extended sources containing a central point source.

The extended and central point (epn) model
The epn model is introduced to recover clusters with central AGN contamination.This is required in addition to the ext model which can miss clusters that are too peaked in the core region.In the epn fit, the candidates are fitted using a superposition of the convolved β profile and ELLBETA PSF model.We defined two parameters to quantify the likelihood of the epn fit with respect to a) the point-like pnt and b) the simple extended ext fit.Both the epn_stat_pnt and epn_stat_ext values are defined as the difference in the best-fitted values (E BF ) of the Cash (C)-statistic (Cash 1979) for each model.The third key parameter in the epn model is the epn_ratio, which is the ratio of the count rate estimated from the pnt and ext models.The three key properties are therefore where E BF is the best fitted value of the Cash (C)-statistic (Cash 1979) for each model.The higher the value of the epn_stat_pnt or epn_stat_ext, the better the fit from the epn model compared to either the pnt and ext models alone.In more physical terms, the epn_stat_ext value determines that the contaminated cluster is sufficiently peaked while remaining extended, while the second (epn_stat_pnt) distinguishes the contaminated cluster from a point source.The epn_ratio is analogous to a flux ratio between the central point source and cluster.

Defining the AC parameter space
Since AGN-contaminated clusters are a particular class of objects, they must be distinguishable from existing XXL source criteria.We recap these categories below (for a more detailed description, the reader is referred to Pacaud et al. 2006).The C1 class refers to cluster candidates where the level of purity is above 90% and contamination from point sources is deemed negligible.The C2 class refers to cluster candidates with an assigned purity of 50%, and hence this class also includes misclassified AGNs, image artefacts, and spurious detections.The XXL pipeline criteria for the C1 and C2 classes is outlined in Table 2.We define a new class for the AGN-contaminated clusters, hereafter the AC class.We first distinguish these sources from field AGNs, and, subsequently, from the uncontaminated cluster population.From the set of simulations described in Section 2, we correlated the input and Xamin output sources with a maximum radius of 37.5" for clusters (both contaminated and uncontaminated) following the prescription outlined in Pacaud et al. (2006).Point sources were correlated within 12.5" of an input source.Figure 2 shows the distribution of the simulated field AGN in the epn_stat_ext versus epn_stat_pnt parameter space.As expected, the point sources do not produce sufficiently high likelihood values for the epn model, as the E BF for these objects is highest for the pnt model alone.We applied a cut at epn_stat_pnt ≥ 20 to separate the AC and AGN populations.
Next we segregated AC candidates from the population of pure uncontaminated clusters.The top panel of Figure 3 shows that both pure and contaminated clusters, in green and pink respectively, exist above epn_stat_pnt > 20, since both are types of extended objects.We used the epn_ratio to separate the 'peakiness' of the two classes, selecting a threshold of epn ratio ≥ 0.2.After applying this cut, the majority of pure clusters have lower epn_ratio values compared to the AC class (Figure 3, bottom panel).We also imposed a cut on the core radius, epn_ext ≥ 5", similarly to the C1 and C2 criteria.We selected a slightly higher value of 5" rather than 3" for the pure clusters to compensate for the fact that the AC sources are, by defintion, more peaked.The final criteria for the AC selection is summarised in Table 2.We emphasise that given the use of X-ray image simulations, no light cone information is provided, and therefore the density of points in Figures 2 and 3 is not physically relatable to the real ratio of C1 and AC clusters.Nevertheless, we estimated the misclassification rate of C1 to AC clusters for the simulated dataset.
Out of 5900 clusters in total (see Section 2), 3521 are recovered as pure C1 by the Xamin detection algorithm.149 are classed as AC (less than 3% of the total set).Among the 149 misclassified C1, over 90% have an input core radius of r c ≤ 5 , highlighting that the highest misclassification rate occurs at smaller radii; i.e. clusters that appear more peaked are more likely to be classed as AC rather than C1.Overall, the number of predicted C1 to AC misclassifications is much smaller than the number of AC sources presented in Section 5. Finally, we re-simulated the detection process using a cosmological simulation -not including AGN contamination -over a 25 deg 2 area (Bhargava et al. in preparation).We processed the field following the tile system detailed in Section 5.1, taking into account pointing overlaps.
The results show the fraction of C1 clusters misclassified as AC is similar to that obtained with the single-pointing simulations.
We define two sub-classes within the AC category: 1) the pure AC class, which consists of objects that meet only the selection criteria from the epn model, and 2) the C1/C2-AC class, comprising sources that satisfy both criteria.Both of these classes have a concerted impact for X-ray surveys.The pure AC class serves as an indicator of cluster candidates that are not re- covered by the latest XXL pipeline due to a highly peaked emission profile.We used this classification to assess the missed fraction of clusters in Section 7. The second C1/C2-AC class refers to known clusters, but with some unmodelled AGN contribution or cool-core signature.The impact of such sources is more astrophysical; while they do not contribute to the missed cluster fraction, the peaked morphology of C1/C2-AC clusters, in particular if originating from AGN contamination, means their use in scaling relations can be challenging and requires special attention (Eckert et al. 2016;Sereno et al. 2020;Lovisari & Maughan 2022).

The AC selection function
To determine the AC selection function, the detection probability of point-source contaminated clusters is computed for each combination of core radius and count rate described in Section 2. This is for all sources in the output catalogue that fulfil the AC criteria.The resulting selection function is shown in Figure 4.
The selection function is plotted in the r c -CR observable plane.While the overall shape is consistent with the one derived for the pure C1 case (left panel of Figure 10), the most notable difference between the two cases is the more peaked shape of the AC detection probability.Owing to the centrally concentrated X-ray emission within the AC objects, the detection rate falls off more sharply compared to that of C1 clusters as a function of CR, while the range of core radii is narrower.The C1 selection function is illustrated as part of a more detailed assessment of the impact of AC clusters for cosmological applications (Section 7).
We emphasise that in order to define the class of AGNcontaminated clusters, we only used the Xamin pipeline parameters.From this classification alone, it is not possible to determine the exact nature of the AC object -simply that it is an extended source with a peaked central emission profile that is better fit by the epn model than either the ext and pnt fits alone.We identify three principal reasons for this: an X-ray point source located at the cluster position (either physically associated or as a result of a foreground/background projection), a cluster with a prominent cool-core, or an X-ray-bright nearby extended object, such as a galaxy with an active nucleus.In principle, X-ray cluster samples are biased by the occurrence of any of these particular features.We aim to characterise the number of AC objects in the XXL survey that come under each of these categories, using complementary, multi-wavelength methods of confirmation.

Data processing and sample selection
We implemented the AC criteria within the latest version (hereafter V4.3) of the XXL pipeline to undertake a systematic search for AC clusters within the survey footprint.Details of the most recent XXL pipeline are given in XXL Paper XXIV; below we summarise the salient aspects.First, event lists were created from raw observation data files (ODFs) using the SAS software (Gabriel et al. 2004) tasks emchain and epchain, filtered for solar soft photon flares.The cleaned event lists were then used to produce images of 2.5 per pixel to correctly sample the XMM PSF ( 6 on-axis) using evselect.Three images were produced -one for each EPIC detector (MOS1, MOS2, and PN) -for three energy bands: [0.3-0.5],[0.5-2.0], and [2.0-10.0]keV.In what follows we predominantly focus on [0.5-2.0]keV images as this is most relevant for cluster detection and characterisation.Departing from the earlier use of approximately 700 single XMM pointings spread over 50.9 deg 2 of the extragalactic sky, the most up-to-date version features images that are mosaicked into 68 × 68 'tiles' (the term 'mosaic' is reserved for images consisting of more than one EPIC detector).One tile was created per EPIC instrument, pixelised at 2.5 using the SAS tasks attcalc and evselect.The tiling layout is designed such that there is a 4 overlap between tiles, with approximately 20-25 pointings per tile.The three individual tile images were coadded into a single mosaic prior to running the XXL source detection pipeline (described in Section 2.2).We detect 27 AC candidates in the northern field, 23 of which are 'pure' AC objects, three are C2-AC, and one is C1-AC.In the southern field we recovered 20 such candidates, 18 of which are pure AC, one is C1-AC, and the other is C2-AC.In XXL Paper XX, a third C3 class was also defined corresponding to optically confirmed clusters selected as C1/C2 by a previous pipeline version, but not by the present one.Typically these clusters exhibit an X-ray emission that is weak enough to be at the detection limit of the pipeline.In this study, we recover one C3 cluster known from the literature using the new AC class.The system, XLSSC 063, is a cluster with a spectroscopic redshift z = 0.276 (see

Visual screening
Given that this is the first instance of applying the purely pipeline-driven AC classification to X-ray data, a visual screening process was conducted to confirm the final AC sample.The screening procedure is based on X-ray and optical images.Optical imaging data was taken from Hyper Suprime-Cam (Aihara et al. 2018, hereafter HSC) in the gri bands, the Canada France Hawaii Telescope Lensing Survey1 (CFHTLS, i-band images) for the northern XXL field, and from the Blanco Cosmology Survey (BCS, Desai et al. 2012, i-band images) and the Dark Energy Survey Data Release 1 (Abbott et al. 2018) (gri band) for the southern field.Visual inspection is relatively rapid to perform and provides useful information on the broad nature of each Xray source, as, for example, bright clustered galaxies consistent with a low-redshift cluster, nearby galaxies, clusters with background/foreground/member AGNs, QSOs, two blended pointlike sources, stars, or a significant extended X-ray source with a grouping of faint galaxies consistent with a high-redshift cluster.Altogether, 14/47 objects were discarded and 33 were retained.epn_ ratio > 0.2 Among the 14 discarded objects, five of these were lone QSOs without any visible optical overdensity of galaxies, one was an X-ray detector artefact caused by a nearby star, three were nearby bright stars in the optical images, and five were removed due to their extended X-ray profile appearing as a result of two blended QSOs in the optical image.For all the discarded sources, we do not observe any systematic trend in their Xaminderived properties compared with genuine contaminated clusters or active galaxies.
The remaining 33 sources (20 in the north, 13 in the south) are considered to be genuine extended sources based on X-ray and optical information, with some level of point-source contamination or cool core.The resulting AC catalogue, presented in Table 3, is a heterogeneous sample, shedding light on the fact that similarity in X-ray profiles can nevertheless be obtained by different types of objects.While we are principally interested in the case of AGN contamination in clusters, we find that the AC classification is effective at detecting active fossil and galaxy groups, as well as single active galaxies.In two cases (XLSSU J022129.1-040531 and XLSSU J021830.7-050126), the AC object is centred on a QSO that is located very close to a distant cluster -XLSSC 034 (z = 1.036) and XLSSC 064 (z = 0.874).In these instances, the detection of the AC object is due to the blended X-ray emission from the cluster and the point source.In one further example, we detect a high-redshift (z phot = 1.03) cluster, first discovered as RCS J0220.9-0333 in Jee et al. (2011)  due to a strong red sequence among cluster members, and later confirmed via the SZ signal in Hilton et al. (2018).We detected this cluster for the first time due to a 'boost' in the X-ray emission from a low-redshift foreground galaxy in alignment (Figure 5), allowing us to quantify the occurrences of cluster-galaxy projections along the line of sight in the AC sample.

Redshift confirmation
Out of the 33 candidates, 11 have spectroscopic redshift confirmations published in XXL Paper XX.For six additional objects, we derived spectroscopic redshifts from public (e.g.SDSS, GAMA, AAT) or XXL private data stored in the CEntre de donéeS Astrophysiques de Marseille2 (hereafter CESAM).Two objects have spectroscopic confirmation from the New Technology Telescope (NTT) operated by the European Southern Observatory (ESO).In total, 19 objects in the full catalogue are spectroscopically confirmed.For the objects that possess no spectroscopic confirmation, we report a photometric redshift estimate within 120 arcseconds of the X-ray cluster centre where available.
Photometric redshifts of the clusters were measured using the Wavelet Z Photometric (WaZP) cluster finder, which uses wavelet-based density maps of galaxies selected in photometric redshift space, removing any assumptions on the cluster galaxy population (Aguena et al. 2021).Details on the method used to compute the individual galaxy redshifts is detailed in Gschwend et al. (2018).Where referenced, we refer only to the WaZPbased cluster photometric redshifts.All sources with a confirmed WaZP redshift estimate have a S/N 3.0, above which the occurrence of false detections is considered to be negligible.We prioritised the use of a wavelet-based cluster finder rather than one based on the red sequence to confirm the AC sources for the main reason that we are searching for clusters with central AGN contamination, which may appear more 'blue' (Klesman & Sarajedini 2014), posing issues for colour-based cluster finders.In the absence of WaZP estimates, we used photometric informa-tion from the XMM-BCS survey (Šuhada et al. 2012) or those which were publicly available via the NASA/IPAC Extragalactic Database (NED).
We confirm the cluster nature of an AC object if there are at least three concordant spectroscopic redshifts within the extent of the X-ray emission, or if an obvious brightest cluster galaxy (BCG hereafter), close to the X-ray centroid, has a spectroscopic redshift (mirroring the criteria used in XXL Paper XX). Cluster names with the prefix 'XLSSC' pertain to spectroscopically confirmed clusters.It constitutes a cumulative cluster catalogue, in the sense that objects are published in subsequent independent papers.In particular six new confirmed clusters are published afresh in this paper (210,211,(648)(649)(650)(651).They are tagged by the last footnote in Table 3.The term 'cluster candidate' is used to refer to clusters with insufficient information to be spectroscopically confirmed, and which nevertheless have either a photometric redshift estimate and/or a clear visual overdensity of galaxies.Such objects are provisionally indicated with the 'XLSSU' acroynm.The source coordinates of these objects may be updated when the final XXL source catalogue is published (Bhargava et al., in preparation) if a Xamin version later than 4.3 is used.

Indication of AGN presence
We performed two diagnostic checks to indicate the presence of an AGN within the AC objects.We did this for all 33 sourcesclusters and individual galaxies -as we aim to quantify to what extent the peaked X-ray profile is indicative of an AGN, irrespective of the object morphology.We began by searching for any publicly available optical spectra for QSOs at or near the object position, using SDSS, NED, and CESAM databases.If no QSO spectrum was available, we searched for the presence of emission lines in the BCG spectrum as an indicator of ionised gas, which may suggest the presence of AGN activity.Four cluster candidates were followed up with the MISTRAL spectrograph3 to search for emission lines that could confirm AGN presence (see details in Section A).
Secondly, we used observations from the publicly available All-Sky Wide-field Infrared Survey Explorer (WISE) data release in four photometric bands, centred at 3.4, 4.6, 12, and 22µm and referred to as W1, W2, W3, and W4, respectively.We probed the infrared power law of AGNs by measuring the flux f of the AC sources in adjacent bands, namely f W1 , f W2 , and f W3 .Hot dust emission from the torus heated by AGN activity is expected to result in high flux ratios, hence allowing us to confirm AGN presence.We searched for all mid-infrared counterparts within an angular radius of 60 from the AC position, resulting in 33 mid-IR matches (the full AC catalogue) all within <11 of the object centre.We computed the mid-infrared colour properties of each source in order to assess how many fall within the bounds of type I and II optical spectroscopic AGNs, based on a new selection criterion described in Hviding et al. (2022).The results are shown in Figure 6.We report that out of the 33 candidates, ten are revealed to be within the designated 'AGN wedge' (the objects are marked within Table 3).The majority of these sources have independently confirmed redshifts for a QSO at the cluster centre, reinforcing the AGN contamination hypothesis for these cases.The information related to the AGN for each source is listed in Appendix A. The red markers denote AC objects that have the ten largest hardness ratios (an independent X-ray indicator of AGN presence) described in Section 5.5.All objects are coloured according to the level of point-source contamination in the soft X-ray band, which is defined in Section 6.

Indication of cool-core presence
We elaborate on the AC class further by classifying the fraction of AC clusters where the peaked X-ray profile may be due, fully or at least partially, to the presence of a cool core.In order to do this, we performed a simple hardness ratio test.The hardness ratio (HR) is defined as HR = (H − S)/(H + S), where H is the hard (2 − 10 keV) band and S is the soft (0.5 − 2 keV) band count rate measured in the same sized aperture.Out of the full sample, we report nine clusters that have a hardness ratio of -1, referring to clusters with no measurable X-ray emission in the hard band.If the peaked X-ray emission is visible only within the soft band, this can indicate that cooling gas within the cluster core is contributing to the peaked surface brightness profile, rather than clear AGN activity (which is correlated strongly with a non-zero hardness ratio).These nine clusters with a hardness ratio of -1 are marked accordingly within the table.The hardness ratio allows us to examine the overall spectral shape of the AC sources without a dedicated analysis.Given that we are limited by the number of photon counts, spectroscopic confirmation of point sources within the cluster emission is not feasible for all of the AC sources.However we find the X-ray hardness ratio is consistent with the WISE AGN diagnostic described in Section 5.4, as shown in Figure 6, suggesting that this can assist in determining the presence of AGNs or cooling flows in each of the sources.We acknowledge there are some AC candidates that do not correspond to clear optical overdensities of galaxies; the most common reasons for this are high (z > 0.6) redshift clusters (see Figure 9), or foreground AGNs that dominate the optical image.

Count rate measurements
For the AC candidates, the Xamin pipeline provides both an angular core radius (r c ) and flux estimate from the β = 2/3 surfacebrightness profile.This allows us to derive an approximate count rate for the source within a given radius.The epn model fit also provides the ratio of the fluxes measured for the point source and extended model, from which the individual count rates corresponding to the cluster and AGN can be inferred.The total count rate for the source is determined by summing the individual PN and MOS detectors as follows and the individual rates for the cluster and AGN can be computed via The fraction of AGN contamination, f AGN , of the AC sources can hence be defined as the ratio of the point source contribution to the total flux, which is given as We plot the distribution of f AGN as a function of the AC redshift in Figure 7.We find the trend is indicative of a positive correlation between contamination level and the redshift of the cluster.It is important to note, however, this might not necessarily indicate a stronger AGN presence, but rather a decrease of angular resolution of the instrument.This may result in a larger scatter in the f AGN for clusters above a given redshift.Deeper observations are required to more precisely measure the level of point source contribution in these objects.We do not perform a direct comparison with other studies of point-source contamination in high-redshift clusters (e.g.Willis et al. 2013, XXL Paper XXXIII), owing to the considerably different methods of selection.It is not useful to compare the current AC sample to clusters detected using the C1 criteria as these are necessarily more diffuse and less peaked in their emission profiles.In particular, high-redshift C1 systems with point source contamination occur predominantly in the XMM-SERVS area -an approximately 4 deg 2 region in the northern field, where the sensitivity is up to four times the nominal value for the full XXL area.In contrast, the nature of the AC selection allows for the detection of high redshift AGN-contaminated candidates with considerably lower exposure times on average.The release of the final XXL cluster catalogue will allow us to make a more pointed comparison between the differences of the C1 and AC selection, to better assess AGN population statistics in high redshift X-ray clusters.

Missed fraction of clusters due to AGN
In this work, we investigated two related but nevertheless distinct concepts -cluster contamination and sample contamination.
Cluster contamination refers to the level of point source contamination within the individual system, while sample contamination describes the impact of such objects on the overall purity and completeness of a cluster sample for cosmological use.Previous work by Böhringer et al. (2013) defined the contamination fraction within X-ray surveys to be the number of non-cluster sources within a flux-limited cluster sample.However, since the C1 class defined within XXL is calibrated to be above 90% pure, we instead focused on quantifying some of the C1 incompleteness.This is done by analysing the 'missed' fraction of clustersthose that are missed from the final sample due to the presence of AGNs.To do this, we computed the fraction of AC sources that would be classed as C1 if the emission from the central AGN were removed.The epn model is a superposition of the ext and pnt models, so we analysed the epn_ext and epn_ext_like parameters that were analogous -but strictly speaking, not identical -to the C1 selection criteria presented in Table 2.This set of criteria corresponds directly to the extended β-model component of the epn fit, and is used to mirror the selection for the C1 class shown in Table 2. Out of the 33 objects, we find that 11 fulfil the criteria, and eight of these are clusters.The distribution of these clusters is displayed in Figure 8.If we consider the C1 sample used in the latest XXL cosmological analysis (XXL Paper XLVI), this corresponds to a missed fraction of 5%.In other words, 5% of genuine clusters are excluded from the cosmological dataset due to contamination from a central AGN.Strikingly, after removing the point-source contribution from the AC sources, clusters can be recovered in the 0.8 ≤ z ≤ 1 range, suggesting that AC and cool-core clusters may help to explain the deficit of detected X-ray clusters above z > 0.6 (Figure 9).Such a deficit has been reported in X-ray cluster samples based on the predicted number density of clusters using the Planck CMB cosmological model (Planck Collaboration et al. 2014).This deficit has been observed within both the northern and southern XXL fields, yet its origin remains unclear (Clerc e denotes photometric redshifts from the XMM-BCS survey (Šuhada et al. 2012;Bleem et al. 2015).
f denotes spectroscopic redshifts from NTT. g denotes publicly available spectroscopic redshifts.* denotes objects that were classified as C1 in XXL Paper XX but without redshift estimates.
† denotes AC objects which fall within the WISE type I/II AGN wedge (Figure 6) ‡ denotes AC clusters which display an indication of a cool core (Section 5.5) § denotes new XLSSC clusters, first published in this work.Numbers denote the known XLSSC object that is blended with the AC source.Redshifts are quoted for the object in these cases, with additional redshifts provided in the relevant column where applicable.et al. 2014;Pacaud et al. 2018).Independent X-ray samples such as McDonald et al. (2013) similarly report a deficit of highredshift (z ≥ 0.75), cuspy, cool-core clusters.While the AC sample of objects is considerably smaller in size compared to the C1, Figure 9 shows that is more homogeneous across the overall redshift range.Since the X-ray luminosity depends on the gas density squared, it is expected that X-ray clusters at high redshift are more likely to be detected if they have more peaked profiles, hence the AC classification is a critical tool to recover clusters that are otherwise missed by the C1 classification alone.
Finally, we note that all the C1/C2-AC objects, after removing the central point-like emission, are no longer classed as C1 objects.This is not unexpected since we are removing the majority of the flux from objects that are already classed as C1/C2 by the pipeline.While these objects do not impact the cosmological dataset, since they are known by definition in the C1 selection function, the number of C1/C2-AC may inform as to the coolcore fraction of the C1 sample.Interestingly, these objects also displayed no clear signature from an AGN from the criteria outlined in Section 5.4, suggesting that their AC classification may support a cool-core morphology rather than clear point-source contamination.
The missed cluster fraction from other X-ray surveys such as eROSITA and Athena is likely to be determined by five main factors.Three of these are instrumental (the sensitivity, PSF size, and background level) and two are survey-dependent (exposure time and survey area).Given the flux limit in XXL is ∼ 80 photons for C1 clusters, we are able to detect a cluster of luminosity L = 10 44 erg s −1 at this limit up to a redshift z ∼ 0.8.Assuming the same background level and exposure time, the increased sensitivity of the Athena Wide Field Imager (WFI) will reach the equivalent SNR limit ≥ 5 for such a cluster at a redshift z ∼ 1.9.This will result in the detection of many more systems, therefore also increasing the number of the clusters missed due to AGN presence.Given that the peak of cosmic AGN activity occurs at z ∼ 2 (Aird et al. 2015), we can infer that the missed fraction for Athena is likely to be larger than for the XXL survey.

Impact on cosmological parameters
As described in Section 4, the selection function for AC clusters was computed in the CR-r c parameter space using three flux ratios.We then applied the XXL pipeline to select AC objects in the Xamin output parameter space (epn pnt stat, epn ext and epn ratio).This is subsequently mapped back into the input CRr c parameter space; this quantifies the probability of detecting clusters at each CR-r c combination.We emphasise that it is not the distribution of Xamin output CR and r c values but rather the input values, following the prescription first described in Pacaud et al. (2006).
While the number of missed clusters within the XXL survey is limited by the small survey area and relatively high exposure on average for extended sources (resulting in fewer misclassifications between clusters and AGNs), consequences may be more drastic for larger X-ray surveys with smaller exposure times, where the detection of extended sources may be more impacted by point-source contamination (see e.g.Bulbul et al. 2021).
We therefore estimated the impact of missed clusters by modelling the C1 in tandem with the pure AC selection function, to take into account the lost fraction of clusters where d is chosen to denote the percentage of clusters missed from the C1 sample due to their pure AC classification.We compared diagrams for the selection function for two d values: 0 (no missed clusters) and 0.05 (5% contamination), shown in Figure 10.The 5% value is chosen based on the eight clusters that are 'missed' out of 178 in the latest cosmological sample.The difference between the two cases reveals the change in overall shape of the detection probability based on the fraction of missed clusters from the final sample.Both the C1 and AC selection functions in this case were computed using the simulations described in Section 2.
To quantify the cosmological impact of mis-modelling the selection function due to the presence of AC clusters, we study the Ω m -σ 8 parameter space for the case of 5% missed clusters for two levels of sky coverage: a) 47.36 deg 2 (XXL-like) and b) 1000 deg 2 .We used the ASpiX (Clerc et al. 2012, XXL Paper XLVI) method to perform the cosmological analysis with the following method.In each case, we generated a predicted diagram for a fiducial cosmology with a selection function corresponding to the percentage of clusters missed due to AGN contamination (5%).We then rescaled it to the chosen survey area and applied Poisson noise (the same seed is used in all cases).Finally, we applied a Markov Chain Monte-Carlo (MCMC) approach to estimate posterior distributions and the log-likelihood is chosen to only account for Poisson noise, where n is the total number of predicted clusters in the redshift bin, i, and N j , and n j , respectively, refer to the observed and predicted number of clusters in the CR-HR bin j for a redshift z i .We ran two different analyses: with the selection function computed taking into account that 5% of sources are 'missed' by the C1 class (d = 0.05 in Equation 6), and one with the pure C1 selection function (d = 0).The fiducial parameters are chosen to be the ones measured from XXL Paper XLVI (XXL-HSC AS-piX + XXL cluster clustering + BAO), namely Ω m = 0.364 and σ 8 = 0.793.
The cosmological posterior estimates for the two surveys are shown in Fig. 11.As expected, for an XXL-like survey, parameter uncertainties are dominated by Poisson noise.We found that a correct modelling of the selection function results in a Ω m -σ 8 posterior distribution that is consistent with the fiducial values, while a selection function accounting for only extended sources in its estimation also remains in good agreement within 1σ.However, going to a 1000 deg 2 survey area, the discrepancy is significantly more pronounced and shows how AGN contamination could be problematic for X-ray surveys to come.While the more accurate modelling of the selection function, shown by the pink contour, encompasses the fiducial value within 1σ well, the selection function that does not account for AGN contamination shows an ∼ 3σ tension with the fiducial values.We emphasise that increasing the survey size is used as a proxy for increasing the number of clusters in the sample.While the 1000 deg 2 realisation predicts ∼ 4000 clusters based on the XXL selection function, we reiterate that eROSITA will likely detect ∼ 10 5 clusters, and hence this tension may be larger.
Finally, the results obtained in XXL Paper XLVI are not significantly impacted by the contamination level from AGNs.As outlined in Figure 11, the impact of contamination at the 5% level for an XXL survey area is negligible, though we stress that our model comparison fixes all relevant parameters aside from Ω m and σ 8 .However, for future surveys such Athena, where clusters will be detected out to a redshift of z ∼ 2, we anticipate a considerably larger contamination rate from AGNs within clusters.In a similar vein, all-sky missions such as eROSITA may plausibly have a contamination fraction that is larger than 5%.Due to the larger survey area, we suggest that without proper modelling of the selection function, a 5% missed fraction of genuine clusters may constitute a lower rather than upper limit for such surveys.XXL AC sample XXL AC clusters recovered as C1 XXL AC galaxies C1 threshold Fig. 8. AC clusters recovered as C1 by detection pipeline after the point-source contribution from the central region of the cluster is removed.The recovered clusters are given by the pink triangles, while the total AC population is displayed in blue.Yellow squares denote AC galaxies that would not appear in the final sample following visual screening.The lilac dot-dashed line demarcates the C1 threshold.We note that four AC clusters do not appear in this plot as their epn like ext value is exactly 0, indicating that their profiles were too peaked to be fitted adequately by the extended model.

Summary and conclusions
The AC sample is the first pipeline-derived catalogue of clusters with measurable AGN contamination within the XXL survey.In particular, the characterisation of the 25 AC clusters, using Xray and multi-wavelength diagnostics, forms a valuable dataset to better understand the evolution of AGN with clusters and their impact on cosmology.We used extensive XMM-like image simulations to define a parameter space to capture AC clusters by modelling the point-like and extended X-ray emission simultaneously.We then applied this criteria within the XXL pipeline to generate a sample of clusters impacted by AGN presence or with cool core signatures.Our work revealed that AGN contamination in clusters is present well into the intermediate redshift range (0.5 < z < 1), consistently with other studies (e.g.Logan et al. 2018;Maughan & Reiprich 2019).We found that removing the point-source flux contribution from these objects allows for the recovery of genuine clusters in parts of the mass-redshift plane currently excluded by the canonical cluster selection function, implying that clusters are 'missed' by current X-ray detection methods.We estimated the impact of these missed clusters to be of the order 5% in the most recent XXL dataset.Finally, we quantified the impact on the Ω m -σ 8 parameter space as a result of improperly accounting for these missed objects within the selection function.Consequences are not drastic for small XXL-like areas, but likely to be more substantial for other X-ray surveys.Our future work will involve finding additional, complementary methods to determine AGN presence within clusters, exploiting both the spectral and image properties of these objects; for example, machine learning methods to denoise and increase the spatial resolution of XMM-Newton images (Sweere et al. 2022) may lead to better classification and identification of AC systems.One limitation of our study is that unlike cool cores, contaminating AGN are not necessarily located in the centre of the X-ray cluster emission, and hence the epn model developed so far is limited in identifying only missed clusters where AGNs are sufficiently close to the X-ray centre.Future work will include placing the point sources in different locations relative to the cluster emission and assess the resulting detection probability.We will also aim to compare the evolution of AGN contamination in clusters using hydrodynamical simulations.A natu- ral extension of this work will be to subsequently subtract the AGN emission from the cluster flux in order to render contaminated clusters usable for scaling laws and cosmological studies.With larger samples it will further be possible to quantify the co-evolving fraction of AGNs within clusters as a function of redshift.Overall, the class of AC clusters is rich for both astrophysical and cosmological uses, with a potentially significant impact on future X-ray studies.Larger and deeper datasets will allow for a more precise determination of the properties of these objects to maximise the cosmological potential of clusters.
XXL is an international project based around an XMM Very Large Programme surveying two 25 deg 2 extragalactic fields at a depth of ∼ 6 × 10 −15 erg cm −2 s −1 in the [0.This research made use of Astropy4 , a communitydeveloped core Python package for astronomy (Astropy Collaboration et al. 2013, 2018).This work also made use of the pyproffit package (Eckert et al. 2020), as well as numpy, scipy and matplotlib.The data underlying this study are available in the article.Cluster candidate XLSSU J232936.7-555349showing two galaxies at the centre of the X-ray emission at z = 0.31 and a QSO at z = 2.03.Both galaxies host an AGN.Some additional galaxies nearby are possibly at the same redshift.This is a line-of-sight projection of AGN or a small group.Cluster candidate XLSSU J233809.3-555350 with a QSO at the centre of the X-ray emission at z = 3.81 and a possible BCG above the QSO.Cluster LCS-CL J233802-5553.3with tentative spectroscopic redshift at z=0.6 is located 1 arcminute to the bottom left of the X-ray centre (Bleem et al. 2015) .

Fig. 1 .
Fig. 1.Comparison of simulated uncontaminated (left) and point-source contaminated (right) clusters.Top panel: surface brightness (SB) distribution showing the extracted cluster profiles (black crosses) are plotted against the blue line corresponding to the fitted β-model; the green line displays the particle background level extracted from each image.Bottom panel: Simulated 10ks XMM pointings showing a cluster with a core radius r c = 20 and count rate CR = 0.1 cts/s.For the contaminated cluster, 50% of the overall source counts lie within the central point source.The colour bar shows the number of photons within each pixel (2.5 per pixel scale).

Fig. 2 .
Fig. 2. Simulated AC versus field AGN comparison for the simulated dataset.The red line denotes the cut for the AC class, where a largely pure fraction of AC objects are expected.
Figure A.2), with [NII], [OI] and [OII] emission lines in the spectrum of the BCG, indicating the presence of ionised gas in the central galaxy.

Fig. 3 .
Fig. 3. Population of simulated AC and uncontaminated clusters in the output XAmin parameter space.Top panel: Distribution of AC sources (pink crosses) compared with uncontaminated clusters (green circles).Bottom panel: Distribution of AC sources and uncontaminated clusters shaded according to the epn_ratio parameter.The red line highlights the epn_stat_pnt > 20 cut.Dark shaded circles above the red line indicate pure clusters that are separable from the AC population due to their having an epn_ratio ≤ 0.2.

Fig. 4 .
Fig. 4. Contours of AC detection probability as a function of the total count rate (CR) in the 0.5-2 keV band and the input core radius (r c ) from the β model.An exposure time of 10 ks was used along with nominal background value of b = 1.The flux ratio chosen was 0.5, i.e. half the count rate of the cluster is contained within the central AGN.

Fig. 5 .Fig. 6 .
Fig. 5. Zoomed-in view of a new AC cluster candidate, XLSSU J022055.4-033332(z phot = 1.03).Left: HST ACS F850LP/F775W composite image around the cluster position (red cross), highlighting the distribution of red sequence cluster members behind the star forming spiral galaxy (z spec = 0.15).Right: Raw 7 × 7 arcminute XMM image centred on the same source, showing the peaked X-ray profile due to the superposition of point-like (galaxy) and extended (cluster) emission.The X-ray contours are shown in blue.Green squares indicate X-ray-pipeline-detected objects.

Fig. 7 .
Fig. 7. Trend of f AGN as a function of redshift for the AC clusters.Pink triangles illustrate the individual systems, with the binned trend and standard error displayed in blue.The lilac dashed vertical lines denote the binned redshift boundaries: z < 0.3, 0.3 < z < 0.7, z > 0.7.

Fig. 9 .
Fig. 9. Redshift distribution of the AC clusters in this study compared to the C1 sample used in the previous cosmological analysis of XXL Paper XLVI.The ratio of AC to C1 clusters is approximately 50 percent at z ∼ 0.6, indicating that the population of AC clusters may increase as the number of detected C1 objects decrease.

Fig. 10 .Fig. 11 .
Fig. 10.Impact of AGN contamination on XXL selection function in the CR-r c parameter space.We considered two cases: a pure case where no clusters are missed due to AGN contamination (left), and the measured missed fraction from XXL, constituting 5% of the cluster population.The detection probability is reduced in the case of 5% missed clusters, particularly in the CR > 0.1 region, reinforcing the hypothesis that very peaked clusters are excluded by the C1 selection alone.

Fig
Fig. A.16. Cluster candidate XLSSU J020435.7-061922 with AGN at z spec = 0.91.Many HSC photo-zs within the field are found to be at the same redshift.

Fig
Fig. A.19. Cluster candidate XLSSU J023322.1-045506.The X-ray emission is centred on a QSO at z=0.78 (SDSS).The cluster is approximately at the same photometric redshift.

Fig
Fig. A.22.Cluster candidate XLSSU J232936.7-555349showing two galaxies at the centre of the X-ray emission at z = 0.31 and a QSO at z = 2.03.Both galaxies host an AGN.Some additional galaxies nearby are possibly at the same redshift.This is a line-of-sight projection of AGN or a small group.

Fig
Fig. A.23. Cluster candidate XLSSU J233006.5-545553 with visible galaxies possibly at concordant redshift but with no spectroscopic information.There exists also the possibility of a high-redshift cluster.The origin of the X-ray emission is unclear.Nevertheless, this source falls within the type I/II AGN wedge based on WISE data.

Fig
Fig. A.24.Cluster candidate XLSSU J233809.3-555350 with a QSO at the centre of the X-ray emission at z = 3.81 and a possible BCG above the QSO.Cluster LCS-CL J233802-5553.3with tentative spectroscopic redshift at z=0.6 is located 1 arcminute to the bottom left of the X-ray centre(Bleem et al. 2015)

Fig
Fig. A.31. QSO XLSSU J022129.1-040531.XLSSC 34 at z spec = 1.036 is separately detected.However, the X-ray emission is centred on a possible AGN with uncertain redshift in SDSS (z=1.23).The AGN classification is dubious because of its low S/N spectrum.

Fig
Fig. A.33. Active galaxy XLSSU J022445.6-030224 with a known QSO at z = 1.23 and a cluster that is clearly visible to the south-east of the object.

Table 1 .
Input configuration for XMM simulations of cluster profiles.The numbers in brackets indicate the number of clusters simulated per pointing as a function of core radius and total count rate.The run no. is the number of realisations per total count rate and core radius.
Read et al. (2011) at 10ks, yielding approximately 830 randomly distributed point sources per pointing.Both point-source and extended-source profiles were convolved using the latest ELLBETA PSF model fromRead et al. (2011), available from the XMM calibration data, which takes into account the strong distortions of the PSF at large off-axis angles.

Table 2 .
Summary of the various types of source and their selection criteria.If more than one condition is specified, all conditions must be used unless explicitly stated otherwise.

Table 3 .
Full sample of 33 AC sources.Col. 1 displays the XLSSC name or the new source tag for the cluster based on the latest version of the XXL pipeline.Cols. 2 and 3 give the cluster position; col. 4 is the estimated redshift (see footnote); col 5. is the automated Xamin pipeline classification; col 6. gives the object type.Col 7. provides the spectroscopic redshift of the QSO counterpart where available.Col. 8 provides the AGN contamination fraction measured in the soft X-ray band.The horizontal line divides the 25 clusters and cluster candidates from eight non-cluster AC objects.
†Notes.The 'a' class refers to objects which satisfy only the AC criteria, while 'C1/C2-A' refers to those which satisfy both the C1/C2 and AC criteria.a denotes spectroscopic redshift estimates reported in XXL Paper XX. b denotes WaZP photometric redshift estimates.c denotes publicly available photometric redshift estimates.d denotes spectroscopic redshifts stored in CESAM.
5-2] keV band for point-like sources.The XXL website is http://irfu.cea.fr/xxl.The authors would like to thank the anonymous referee for instructive comments that helped improve the manuscript considerably.The Saclay team (SB, MP, NC) acknowledges long term support from the Centre National d'Etudes Spatiales (CNES).SB acknowledges a CNES postdoc and support from CNRS, support from the ESA Archival Research Visitor Programme, and would like to thank P. A. Giles, A. Pellissier, J. B. Melin, and R. T. Duffy for fruitful comments.This work was supported by the Programme National Cosmology et Galaxies (PNCG) of CNRS/INSU with INP and IN2P3, co-funded by CEA and CNES.BJM acknowledges support from STFC grant ST/V000454/1.This work was based in part on observations made at Observatoire de Haute Provence (CNRS), France, with the MISTRAL instrument.This research has made use of the MISTRAL database, based on observations made at Observatoire de Haute Provence (CNRS), France, with the MIS-TRAL spectro-imager, and operated at CeSAM (LAM), Marseille, France.