Populations of filaments from the distribution of galaxies in numerical simulations

We present a statistical study of the filamentary structures of the Cosmic Web in the large hydro-dynamical simulations TNG300-1 and MAGNETICUM at redshift z=0. We focus on the radial distribution of the galaxy density around filaments detected using the Discrete Persistent Structure Extractor (DisPerSE). We show that the average profile of filaments presents an excess of galaxy density (>5 sigma) up to radial distances of 27 Mpc from the core. The relation between galaxy density and the length of filaments is further investigated showing that short (L_f<9 Mpc) and long (L_f>20 Mpc) filaments are two statistically different populations. Short filaments are puffier, denser and more connected to massive objects, whereas long filaments are thinner, less dense and more connected to less massive structures. These two populations trace different environments and may correspond to bridges of matter between over-dense structures (short filaments) and to the cosmic filaments shaping the skeleton of the Cosmic Web (long filaments). Through MCMC explorations, we find that the density profiles of both short and long filaments can be described by the same empirical models (GNFW, beta-model, a single and a double power law) with different and distinct sets of parameters.


Introduction
On its largest scales, matter in the Universe is not distributed uniformly: it is organised in clusters, filaments, walls and voids. These structures form the Cosmic Web (Bond et al. 1996), a gigantic network of dark matter and gas, formed under the effect of gravity from the anisotropic collapse of initial fluctuations of the density field (Zel'dovich 1970). The Cosmic Web was first observed in the Center for Astrophysics (CfA) galaxy survey by de Lapparent et al. (1986) and since then has drawn a lot of attention in both observational and simulation fields.
Indeed, the Cosmic Web, as traced by galaxies, has been observed over the last two decades in many galaxy surveys with increasing resolution and statistics. We note for example the Sloan Digital Sky Survey (SDSS, York et al. 2000), the two degree Field Galaxy Redshift Survey (2dFGRS, Colless et al. 2003), the Cosmic Evolution Survey (COSMOS, Scoville et al. 2007), the 6dF Galaxy Survey (6dFGS Jones et al. 2009), the Galaxy and Mass Assembly (GAMA, Driver et al. 2011), and the VI-MOS VLT deep survey (Le Fèvre et al. 2005, VVDS), VIPERS (Guzzo et al. 2014) and SAMI (Bryant et al. 2015) surveys. All of these observations showed galaxies distributed in filamentary structures, exhibiting the filamentary pattern of the Cosmic Web.
A deeper understanding of the dynamics of the large scale structures was achieved thanks to N-body simulations (e.g. Bond et al. 1996;Springel 2005). Dark matter (DM) was shown to assemble from voids to walls, then flowing to filaments until reaching the highest density regions, the nodes. In addition, N-body simulations provided the means to examine the morphology and density of the different cosmic structures (see e.g. Hahn et al. 2007;Aragón-Calvo et al. 2010b;Cautun et al. 2014). More recently, high resolution hydro-dynamical simulations aiming to match some of the current observations (e.g. Illustris (Vo-gelsberger et al. 2014) and IllustrisTNG (Nelson et al. 2019), MAGNETICUM (Hirschmann et al. 2014;Dolag 2015), EA-GLE (Schaye et al. 2015), or the Horizon-AGN (Dubois et al. 2014) simulation) have been done to allow for a more detailed study and characterisation of the cosmic structures, and to follow their evolution in correlation with their tracers: baryonic gas and galaxies (e.g. Gheller et al. 2016;Martizzi et al. 2019;Gheller & Vazza 2019).
While a lot of attention has been drawn to the study of clusters in terms of their galaxy content, galaxy properties, gas composition or density profiles (e.g. Nagai et al. 2007;Arnaud et al. 2010;Baxter et al. 2017; Bartalucci et al. 2017;Pintos-Castro et al. 2019;Ghirardini et al. 2019), filaments remain a challenge to characterise. A hint of the diversity of the filamentary structures has been shown by some case studies in observational data. For example, Bonjean et al. (2018) studied the pair of clusters A399-A401 with a particular focus on the filament between these two clusters, that turned out to be populated by quiescent galaxies and hot and dense gas. Other studies analysed this structure and detected large-scale accretion shocks thanks to observations in the X-ray (Akamatsu et al. 2017), as well as radio emission from the filament (Govoni et al. 2019). Another example from Malavasi et al. (2020b) is the analysis of the filamentary environment of the Coma cluster, showing that this structure is part of a network composed by at least three filaments directly connected to Coma. Moreover, the lack of a standard and unique definition of filaments has led to the development of a variety of algorithms aiming, each with a different approach, to detect and identify the filamentary structures from galaxy distributions or DM particles (e.g. the Discrete Persistent Structure Extractor (DisPerSE) of Sousbie (2011), the SpineWeb of Aragón-Calvo et al. (2010a), the NEXUS algorithm by Cautun et al. (2013), the BISOUS model by Tempel et al. (2016), and more recently the T-Rex method developed by Bonnaire et al. (2019)). Thanks to these detection methods, several statistical studies of galaxies around cosmic filaments have been undertaken (e.g. Malavasi et al. 2017;Chen et al. 2017;Kuutma et al. 2017;Laigle et al. 2018;Kraljic et al. 2018Kraljic et al. , 2019Bonjean et al. 2019;Ganeshaiah Veena et al. 2019;Rost et al. 2020). It has been shown that the properties of galaxies strongly depend on their location with respect to filaments. For example, at the core of filaments, an excess of red with respect to blue galaxies has been detected (Laigle et al. 2016;Malavasi et al. 2017;Kraljic et al. 2018), along with a reduction of the star formation rate (SFR) and an enhancement of stellar masses . Similar studies have also been conducted for filamentary structures around clusters to investigate environmental effects on galaxy evolution (Gouin et al. 2019;Sarron et al. 2019). In addition, stacking analyses using the Sunyaev-Zel'dovich effect (SZ) have revealed the existence of hot gas in filaments (Tanimura et al. 2019b;de Graaff et al. 2019;Tanimura et al. 2020), and numerical simulations have helped to characterise this gas (e.g. Gheller & Vazza 2019;Martizzi et al. 2019).
In this paper, we study filaments detected with the DisPerSE algorithm (Sousbie 2011;Sousbie et al. 2011) by means of their galaxy density profiles, in two large numerical simulations, namely Illustris-TNG (Nelson et al. 2019) and MAGNETICUM (Hirschmann et al. 2014;Dolag 2015). We aim at characterizing cosmic filaments and identifying differences, if any, in the galaxy density profile of filaments having different lengths and lying in different environments. Inspired by the galaxy cluster literature and following an empirical approach, we also investigate whether some analytical models can be adapted to describe the radial profiles of filaments of the Cosmic Web.
This paper is organised as follows: in Sect. 2, we describe the Illustris-TNG and the MAGNETICUM simulations, and the two associated galaxy catalogues used for the identification of the filaments. The filament catalogue and its extraction with DisPerSE are described in Sect. 3, along with the method for the computation of the galaxy density profiles. Section 4 presents our results in terms of radial galaxy density profiles, filament populations, filament environments and models fitting the density profiles. Finally, we summarise our conclusions in Sect. 5.

Data
We use the outputs of a state-of-the-art large numerical simulation, namely Illustris-TNG 1 (Nelson et al. 2019), and we compare our findings with the outputs of a second large scale simulation, the MAGNETICUM Pathfinder 2 (Hirschmann et al. 2014;Dolag 2015). We work with two different simulations simply in order to obtain simulation-independent conclusions.

The simulation boxes
We analyse the gravo-magnetohydrodynamical simulation Illustris-TNG (Nelson et al. 2019). This simulation follows the coupled evolution of DM, gas, stars, and black holes from redshift z = 127 to z = 0. Illustris-TNG is run with the movingmesh code Arepo (Springel 2010), and the values of the cosmological parameters are those of the Planck 2015 (Planck Collaboration et al. 2016) results: Ω Λ,0 = 0.6911, Ω m,0 = 0.3089, Ω b,0 = 0.0486, σ 8 = 0.8159, n s = 0.9667 and h = 0.6774. We focus on the simulation box TNG300-1 at a redshift z = 0. It consists in a cube of around 300 Mpc side length with a DM resolution of (m DM = 4 × 10 7 M /h and N DM = 2500 3 ). We choose to use the largest simulation volume with the highest mass resolution to accurately describe cosmic filaments down to small scales.
We also use the outputs of the MAGNETICUM simulation (Hirschmann et al. 2014;Dolag 2015) at the smallest redshift available, z = 0.066. It consists in a cube of 500 Mpc side length with a DM resolution of m DM = 6.9 × 10 8 M /h. The cosmological parameters of this simulation are different from Illustris-TNG, as the cosmology is described according to results of the seven-year Wilkinson Microwave Anisotropy Probe (WMAP7) data (Komatsu et al. 2011): Ω Λ,0 = 0.728, Ω m,0 = 0.272, Ω b,0 = 0.0456, σ 8 = 0.809, n s = 0.963 and h = 0.704.

The galaxy catalogues
For the TNG300-1 simulation, we build the catalogue of galaxies from the SUBFIND subhalo catalogue, which is a list of gravitationally bound overdensities. The SUBFIND algorithm was first introduced in Springel et al. (2001) for DM simulations, and adapted by Dolag et al. (2009) to treat gas and star particles of hydrodynamical simulations. From the original subhalo catalogue and following Nelson et al. (2019), we discard all the objects that have been flagged by Illustris-TNG as subhalos but have not followed the usual processes of galaxy formation (field SubhaloFlag in the catalogue). This avoids contamination by fragments or clumps originated from baryonic processes. These objects account for a number of 50, 098 subhalos and represent a very small fraction (∼ 0.03%) of the initial catalogue. We apply a cut in stellar mass to the remaining subhalos by using the field SubhaloMassType of the SUBFIND catalogue. Following the observational limits of Brinchmann et al. (2004) and Taylor et al. (2011), we require the stellar mass of the subhalos to lie in the range 10 9 ≤ M * [M ] ≤ 10 12 . After this selection in mass, 275, 818 subhalos remain. Figure 1 presents a projection in the xy plane of the distribution of these subhalos in which the filamentary structure of the Cosmic Web is already discernible. From now on, these objects are referred to as galaxies and constitute our TNG300-1 galaxy catalogue.
Throughout this paper, the results found using the TNG300-1 galaxies will serve as our reference, to which we will compare results obtained with the large Box2/hr galaxy catalogue of the MAGNETICUM simulation. We apply the same stellar mass cut and we end up with 1, 266, 306 galaxies in the mass range 10 9 ≤ M * [M ] ≤ 10 12 . The MAGNETICUM galaxy catalogue is statistically roughly 4.6 times larger than the reference catalogue, which is not surprising considering that the simulation box is 2.5 times bigger. However, the mass resolution of this simulation is roughly 17 times lower than TNG300-1, which may have an impact on the small scale physics (e.g. close to the core of the filament). An overview of the two galaxy catalogues used in this work is shown in Table 1.

Filament detection
We detect and extract the skeleton of the Cosmic Web using the publicly available algorithm Discrete Persistent Structure Extractor (DisPerSE, Sousbie 2011;Sousbie et al. 2011) applied to the galaxy catalogues described in the previous section. Table 1. Overview of the two simulations used in this work. The subhalo catalogue from the TNG300-1 simulation (Nelson et al. 2019) is used as reference for the analysis, and we compare to them the results obtained with the MAGNETICUM galaxy catalogue (Hirschmann et al. 2014;Dolag 2015  DisPerSE is an algorithm that detects filaments based on the topology of the density field, which is computed from the distribution of input particles (galaxies, in this case), using the Delaunay Tessellation Field Estimator (DTFE, Schaap & van de Weygaert 2000;van de Weygaert & Schaap 2009). In this work as a first step, we smoothed once the Delaunay density field by averaging the value of the density at each vertex (which corresponds to the position of galaxies) with the surrounding vertices of the tessellation. This smoothing was performed in order to minimize the contamination by shot noise and to prevent the identification of small scale, possibly local or spurious features (Malavasi et al. 2020a,b).
In order to find the filamentary structures, the algorithm first identifies the critical points of the density field using Discrete Morse theory. These points are located where the gradient of the field vanishes, meaning that the critical point is either a maximum, a minimum or a saddle point of the density field. Filaments are then defined as ridges of the Delaunay density field: each filament is a set of segments connecting a maximum to a saddle point. The user can choose the significance of the detected filaments by fixing the persistence ratio of the corresponding pair of critical points. In this work we extracted the 3D skeleton with a 3σ persistence level. The choice of this value was motivated by Segments of filaments (thick black lines) are organized into portions delimited by critical points (in red, green and blue respectively for maxima, saddles and bifurcations). Maximum density critical points are located in over-dense regions (represented by gray disks) identified from the Delaunay density field. This illustration shows a total of 44 segments, organized in 18 portions forming 13 filaments, defined as the sets of segments connecting maxima to saddles. the fact that a lower persistence value resulted in a larger number of small scale features likely to emerge from the noise, whereas a higher value provoked a significant drop in the number of filaments as only the most reliably identified structures were kept. Furthermore, the 3σ persistence skeleton gave visually the best coincidence of positions of the maximum density critical points with respect to the over-dense regions of the input set of galaxies.
We applied a final smoothing to the extracted skeleton by shifting each segment extremity to the middle position of the contiguous extremities. This smoothing was done with the aim of alleviating the effect of shot noise on the geometry of the filaments, which would otherwise generate sharp and possibly nonphysical edges between the segments composing the filaments.
A 2D illustration of the extracted DisPerSE skeleton is shown in Fig. 2. In this figure, we see that some filaments share common segments that should not be counted twice in the statistical analysis. Therefore, we applied the DisPerSE breakdown procedure to break filaments sharing one or more segments into separate portions of filaments. This is done by introducing bifurcation points at the positions where filaments merge. In this way, we obtain portions of filaments delimited either by maxima, saddle or bifurcation points.
Finally, we noticed an excess of critical points near the edges of the simulation box. These can be removed using dedicated flags in DisPerSE (Sousbie 2011). However, in a more conservative way, we chose to completely disregard the regions of thickness 25 Mpc at the edges of the box. This value is chosen by vi-sual inspection and corresponds to twice the width of the zones presenting this excess. We thus kept 161, 357 galaxies inside the central volume of [250 Mpc] 3 , delimited by the black square in Fig. 1.
For the sake of comparison, we apply the same procedure described in the previous paragraphs to the MAGNETICUM simulation in order to detect and extract the filaments from this galaxy catalogue. The border effects are also corrected by disregarding the regions of 25 Mpc thickness at the borders of this simulation box.
It is worth noticing that, despite being different in size and mass resolution, the Illustris-TNG and MAGNETICUM simulations have the same density of tracers, i.e. the same number of galaxies per Mpc 3 . This ensures that the features detected by DisPerSE are not affected by selection biases and can be compared between simulations.

Filament catalogues
The filament catalogues of the TNG300-1 and MAGNETICUM simulations are built by reconnecting the portions lying inside the sub-boxes of volumes [250 Mpc] 3 and [450 Mpc] 3 (see Sect. 3.1) to obtain filaments linking a maximum density critical point to a saddle point. This topological definition is physically motivated by the fact that matter within a filament is presumed to flow from the saddle (a local minimum in the axis of a filament but a maximum in the transverse axis) to the point of maximum density (Kraljic et al. 2019).
For example in the illustration of Fig. 2, we count 13 reconstructed filaments (from red to green points), 18 portions (connecting any type of critical point) and 44 segments. We thus retrieve, in the [250 Mpc] 3 central box of the TNG300-1 simulation, a total of 5550 maximum-saddle filaments composed by 25, 818 different segments (themselves organized in 6920 portions). The same procedure of filament reconstruction is applied to the MAGNETICUM simulation, and we retrieve 38, 278 filaments in this catalogue.
We compute the length of each filament as the sum of the lengths of all the segments belonging to it, from maximum to saddle. The length distributions of the filaments found in the TNG300-1 and the MAGNETICUM catalogues are shown in Fig. 3 in green and pink, respectively. We can see that both distributions have an exponential tail, in agreement with previous Choi et al. 2010) and more recent (Malavasi et al. 2020a) findings. This distribution hints at the hierarchical and multi-scale character of the filamentary network with significantly more short (peak at ∼ 5 − 6 Mpc) than large filaments (e.g. Cautun et al. 2014). The maximum length of the TNG300-1 filaments is 66 Mpc, the minimum is 0.4 Mpc, and the mean and median lengths are respectively 11 and 9 Mpc. For the MAG-NETICUM filament catalogue the corresponding values are 94 Mpc (maximum), 0.1 Mpc (minimum), 12 Mpc (mean) and 11 Mpc (median).

Galaxy density around filaments
We compute the radial profiles of galaxy density around filaments, i.e. their density along the perpendicular direction to the filament spine (hereafter called r). In practice, the recovered radial profile is the average of the galaxy density distribution around individual segments.
We start by estimating the radial profile around a segment i of a filament by counting the number of galaxies in concentric  cylindrical shells around the axis of the segment, as illustrated in Fig. 4, according to the equation: Here l i is the length of segment i, the index k stands for the cylindrical shell of thickness r k − r k−1 and N k is the number of galaxies in the k-th shell. We bin the radial distance r in 20 equally spaced logarithmic bins, starting from the core of the segment up to r = 100 Mpc. The radial profile of galaxy density around filaments is then computed by averaging the profiles of all the segments. In this average, each segment is counted only once, regardless of the number of reconstructed filaments (see Sect. 3.2) to which it belongs.
Errors on the filament profiles are computed by bootstrapping over the set of individual segment profiles, i.e. for a set of N segments, we randomly select (with replacement) N profiles which we average together. We repeat this procedure N times in order to have N averages. The errors of the filament profile are thus the dispersion of these N averages.
In order to retrieve the properties that are solely specific to filaments, we remove from the analysis the contribution of the nodes. These over-dense structures are determined by the position of the maximum density critical points of the Delaunay density field (hereafter called CPmax). For simplicity, we consider nodes as spherically symmetric objects and assume that the CPmax lie in their centre. Therefore, we compute the radius R 200 associated with each CPmax from the DM particles of the TNG300-1 simulation and we mask the galaxies and filament segments inside spheres of radius 3 × R 200 centered on the positions of the CPmax. The tests and details concerning the choice of mask are discussed in Appendix A. In a similar way, the nodes of the MAGNETICUM simulation are removed by applying a 3 × R 200 mask to the positions of the CPmax. Notice that for this simulation the R 200 radii were computed from the galaxy distribution instead of the DM particles.
In the following, the masked galaxies and segments are removed from the analysis.
Finally, we aim at reducing the effects of a volumelimited box in the density profiles. We thus replicate the galaxy distributions at the borders of the central volumes of the TNG300-1 and MAGNETICUM simulations in order to construct [3 × 250 Mpc] 3 and [3 × 450 Mpc] 3 simulation volumes, respectively. The filaments, defined in the central volumes of [250 Mpc] 3 (TNG300-1) and [450 Mpc] 3 (MAG-NETICUM) are not replicated, as is shown in the 2D illustration of Fig. 5. As we focus only on statistical trends of the galaxy density field, this concatenation (which only affects the continuity of the field at the borders) does not undermine our results.

Average density profile of galaxies around filaments
As explained in Sect. 3.3, the density profile of a filament is the average profile of its segments. Hence, the density profile of all the filaments is computed by averaging all the segment profiles in the catalogue. We show the resulting average profile for the TNG300-1 filaments in the upper panel of Fig. 6 (black curve). We also show (blue curve) the corresponding null-test. The latter is computed by shifting the positions of all the filaments of the catalogue by random offsets and computing the galaxy density profile of these shifted filaments as described in Sect. 3.3. This procedure is repeated 100 times to create 100 different realizations of the original catalogue of 5550 filaments. The values of Fig. 6. Top: Radial density profile of galaxies around filaments of the reference catalogue (TNG300-1). The black curve shows the average galaxy density of all filaments. The blue curve presents the null-test, which is obtained by computing the density of galaxies around randomly shifted filament positions (see Sect. 4.1). The gray horizontal line represents the mean galaxy density of the simulation box. Bottom: Radial density profile of filaments of the TNG300-1 (black curve) and MAGNETICUM (magenta curve) catalogues. For the sake of comparison, the profiles have been rescaled by their background densities. the null-test are given by the average profiles of these 5550 × 100 randomly shifted filaments.
The average galaxy density profile of filaments exhibits a clear excess with respect to the background density. The significance at the core of the filaments with respect to the null-test is found to be ∼ 20 σ. We note that the significance of the detection is above 5σ up to radial distances of r = 27 Mpc. The galaxy density decreases with increasing distance r, until it reaches the average density of the simulation box (gray horizontal line). The null-test of Fig. 6 yields the average galaxy density of the simulation box, demonstrating that the method used to compute the profiles is not biased.
We have similarly computed the average galaxy density radial profile of filaments detected in the MAGNETICUM simulation. The result is shown in the lower panel of Fig. 6 (magenta curve). For the sake of comparison with the profile obtained from the TNG300-1 simulation, we have rescaled both profiles by the respective background densities. We observe that, despite the differences in simulations, the average profiles are remarkably similar, as confirmed by the p-value of 0.22 we obtained from the two-sample Kolomogorov-Smirnov test.

Filament populations
The average galaxy density profile obtained in Sect. 4.1 characterises the entire population of filaments. In order to explore possible dependencies with the filament lengths, we split the TNG300-1 filament catalogue in eight different bins of length chosen so that each contains the same number of segments, ∼ 2200. We recall that the profile of filaments in a given bin of length is the average of the profiles of the segments forming the filaments in this same bin. We show, in the top panel of Fig. 7, the average profile of all the filaments (black dotted curve) together with the galaxy density profiles in the eight bins of length (from yellow to blue). We can see that filaments of different lengths have significantly different radial galaxy densities. The profiles of the shortest filaments lie above the average at all radial distances, whereas the longest filaments are found below the average. The bottom panel shows the deviation from the average profile for each bin of length, which we define as where n subset is the profile of the filaments in a given bin, n tot is the average profile (as in Sect. 4.1), σ subset and σ tot are the bootstrap errors of the corresponding profiles. While the filaments of lengths in the range 9 ≤ L f < 20 Mpc do not present significant deviations from the average profile (|D subset−tot | < 2), the shortest and longest bins of length deviate by more than 2σ, and the differences are the most significant (|D subset−tot | ∼ 8) for distances between 1 to 10 Mpc from the filament spine. We therefore split our catalogue into two populations: short filaments with lengths shorter than 9 Mpc, and long filaments with lengths longer than 20 Mpc.
We compute the average profiles of all the short (L f < 9 Mpc) and long filaments (L f ≥ 20 Mpc), respectively S and L profiles hereafter. Despite a larger number of short filaments (2846 vs 611), the average S and L profiles are computed from approximately the same number of segments (respectively 4733 and 4129). We therefore note that short filaments are statistically made of less segments than long filaments: the mean number of segments per filament areN S seg = 1.7 for short andN L seg = 6.5 for long.
In the following, we study short and long filaments by using Kolmogorov-Smirnov (KS) statistical tests. First, we compare the measured S (resp. L) profile with an average bootstrap profile computed from the complementary set of segments, i.e. the subset of profiles whose segments do not belong to the S (resp. the L) population. We use the KS to test the null hypothesis which assumes that the S and the related bootstrap profiles (resp. the L and the related bootstrap profiles) are drawn from the same parent distribution. We repeat this procedure 1000 times in order to have a distribution of p-values that takes into account the statistical properties of the complementary population. The resulting p-values are found to be always smaller than 6 × 10 −3 and 4 × 10 −6 for the short and long populations, respectively. These results indicate that the density profiles of short and long filaments can not be randomly reproduced, and therefore strongly suggest that there are at least two populations in the total set of filaments. Finally, a unique two-sample KS test is performed to directly compare the S and L profiles. The resulting p-value of 5.9 × 10 −11 confirms that these filaments indeed constitute two different populations.
We compute the average short and long profiles of the MAG-NETICUM filaments in the same bins of length as for the namely [0.4,9] and [20,66] Mpc. The results are presented in Fig. 8, where the solid and dotted lines indicate respectively the profiles of the TNG300-1 and the MAG-NETICUM filaments. In this plot, the four profiles have been rescaled by their common background. We note that L profiles from both simulations are remarkably compatible, especially at radial distances greater than 1 Mpc. Near the core, the MAG-NETICUM density profile exhibits a shallower slope, that may be due to the lower resolution of this simulation (∼ 17 times lower than TNG300-1). By contrast, the two S profiles are significantly different from each other. This difference may be related to an environmental effect specific to short filaments. This is further investigated in Sect. 4.3, where we show that short filaments trace denser regions of the Cosmic Web. In these regions, the astrophysical processes embedded in the sub-grid physics of each particular simulation (such as feedback processes) may have a strong impact on the distribution of galaxies, therefore affecting the galaxy density around short filaments.
We compute some characteristic radial scales for the TNG300-1 profiles. First, the radial extent of the L profile, r L e ∼ 19 Mpc, computed with respect to the corresponding nulltest, is found to be almost twice as small as that of the S profile, r S e ∼ 35 Mpc. Likewise, the radius r 2 , defined as the radius for Daniela Galárraga-Espinosa et al.: Populations of filaments from the distribution of galaxies in numerical simulations which the galaxy density is twice the value of the background density n b , is smaller for long (r L 2 ∼ 3 Mpc) than for short filaments (r S 2 ∼ 5 Mpc). Qualitatively, we find similar results in the MAGNETICUM simulation, namely that long filaments are radially less extended than short filaments, and thinner at all radial scales.

Environments of short and long filaments
With the aim of probing the environment of these two different populations, we compute the galaxy density excess. This quantity, hereafter noted 1 + δ r<R , corresponds to the excess of density of a filament with respect to the background density, summed up to a radial distance of R, in Mpc. It is defined as: In this equation, n fil (r) is the filament galaxy density profile, which corresponds to the average profile of its segments, and n b corresponds to the background density of the simulation. We compute this quantity for filaments of the reference catalogue TNG300-1. The resulting 1 + δ r<2 probability distributions of the short and long filaments are shown in Fig. 9. The radial scale of integration, R = 2 Mpc, was chosen to correspond to the radius of filaments found in other studies (see for example Aragón-Calvo et al. 2010b;Colberg et al. 2005;González & Padilla 2010;Bond et al. 2010;Cautun et al. 2014), although we note that other analyses have found different filament radii (e.g. Bonjean et al. 2019;Tanimura et al. 2019a). The distribution for the total population of filaments is also displayed for comparison. It is important to note that the area under each histogram is normalized to one by dividing the counts by the number of measurements times the bin width.
First, we observe that the density excess of filaments spans almost 5 orders of magnitude, from very under-dense filaments 1 + δ r<2 ∼ 1.9 × 10 −2 , to filaments with densities of the order of clusters 1 + δ r<2 ∼ 8.5 × 10 2 . These results are in good agreement with those of Cautun et al. (2014) where the densities Fig. 9. Probability distributions of the excess of density 1 + δ r<2 (see Eq. 3) of short (orange), long (blue) and the total population of filaments (gray). This quantity corresponds to the excess of density of a filament with respect to the background density, averaged up to a radial distance of R = 2 Mpc. The vertical dashed lines represent the mean values of the distributions. of filaments, detected in a DM simulation, are also found to span a large range, similar to our findings.
Let us now focus on the specific features of the distributions of the S and L populations. We can see that these distributions share a common regime at 1 + δ r<2 ∼ [2 − 300], but they are significantly different at lower values. Indeed, the distribution of long filaments exhibits a clear excess towards the lowest values (peak at 1 + δ r<2 ∼ 0.03) whereas the distribution of short filaments is shifted towards higher values (peak at 1 + δ r<2 ∼ 0.2) and its minimum is 0.07, which is more than twice the value for long filaments, 0.02. Similarly, towards the highest values, the distribution for the short filaments reaches a maximum density of 848, which is a factor of two larger than the maximum of long ones, 415. The mean values are 41 and 34, respectively for the S and L populations, and the medians are 13 and 14. These results indicate that the density distributions of short and long filaments are different, with the statistical trend that short filaments are on average denser than long ones.
In addition to the galaxy density excess, we analyse the connection of short and long filaments to their maximum density critical point (CPmax) in the reference, TNG300-1, simulation. The CPmax are found using the DisPerSE code (see Sect. 3.1) and they correspond to the points of maximum density defining one of the two extremities of a filament. In the previous analyses, they have been masked to suppress the contribution of the nodes of the Cosmic Web in the radial density profiles (Sect. 3.2). We compute the masses at the CPmax positions, hereafter called M CPmax 200 , defined as the DM mass enclosed in a sphere of radius R 200 . The resulting mass distribution is displayed in Fig. 10 for short, long and all the filaments (in orange, blue, and gray, respectively).
We find that short filaments may be connected to more massive objects (maximum mass ∼ 10 14.65 M ) than long filaments (max ∼ 10 14.05 M ). The mean values of these distributions also reflect this trend, the values are 10 12.71 and 10 12.85 M for the long and short populations, respectively.
These studies, combined with the density profiles of the previous section, all suggest that short and long filaments trace These models usually describe two regimes: small (r r f ) and large (r r f ) radii (where r f is a characteristic radius), with a possibility of a transitional region between them in the GNFW case determined by the parameter γ. Each model is characterised by slopes describing the small and large radii regimes. Notice that the names of the exponents in the formulae above have been chosen with the aim of easing the comparison of the models, and may not correspond to the usual labelling.
We fit the average profile of the galaxy density, obtained for the total filament population, for the short and long filaments of the TNG300-1 simulation, to these analytic models and we display in Fig. 11 the reduced chi-squared values, χ 2 ν . We first note that the fit to the Einasto profile (purple dashed line) always yields the highest χ 2 ν values indicating that it is not an adequate model to describe the galaxy density profiles. We also observe that the fits perform always worse (χ 2 ν ∼ 9) for the entire filament set than for the short or the long filament populations considered separately (with respectively χ 2 ν ∼ 1.9 and ∼ 1.2), as expected. We point out that all the tested models perform equally well, in terms of their χ 2 ν values in Fig. 11, for the short or the long filaments populations.
In the following, we focus on the parameters of the fits (fixing n b to the background galaxy density of the simulation box) that we explore using Monte Carlo Markov Chains (MCMC) for the short, long and total populations. We discard the Einsato model and present the best-fit parameters (namely the median values of the posterior distributions) in Tables 2 and 3 for the short and long filaments respectively. The parameters fitting the entire population are presented in Table 4.
In Fig. 12, we show the results of the MCMC exploration in the form of corner plots (orange is for short, blue for long, and black for all filaments). Overall, we note that the parameters are rather well constrained except for the GNFW where we observed Table 2. Results of the MCMC fits on short filaments (L f < 9 Mpc). The S galaxy density profile is adjusted using the models described in Eq. 4,6,7 and 8.  several degeneracies. We also note that fitting short and long filaments separately yields different and distinct parameters, confirming that we are dealing with two very different populations. For illustration, we quantified these differences for the double power law model, using Eq. 2, and we found that the best-fit values of long filaments are 5.7, 3.3, 2.7 and 7.2 σ away from the medians of short filaments, for the parameters n 0 , r f , α and β respectively. By analysing the values of the parameters in Tables 2 and 3, we observe that, for all the models, short filaments have always lower r f values than long filaments, meaning that the transition between the two radial regimes occurs at smaller scales for the short population. Moreover, long filaments have in general steeper slopes, especially at large radii, indicating a faster drop of the galaxy density with radial distance. This is in qualitative agreement with the findings of the previous sections.
These results can be put in context with the radial DM density profiles of filaments from N-body simulations of Colberg et al. (2005), González & Padilla (2010) and Aragón-Calvo et al. (2010b), where it is shown that the DM density follows a power law of slope −2 at the outskirts of the filament. In this work, the density of galaxies around short and long filaments is found to follow outer slopes of roughly −1.82 and −2.14, suggesting that, at the outskirts of the filament, galaxies follow the DM skeleton. However, for a proper comparison with the previously cited papers one should extend this work to DM density profiles of short and long filaments in order to quantify any possible bias between DM and galaxy densities.
Finally, we display in the upper panel of Fig. 13 the data points and the models obtained using the best-fit parameters of the double power law and the GNFW model plotted in dotted and solid lines, respectively. The orange color stands for short filaments and blue is for long filaments. These two models illustrate a case where parameters are well constrained (double power law) and another with significant degeneracies (GNFW).
We also show, in the lower panel of Fig. 13, the relative difference between the data and the model defined as ∆n/n(r) = [n data (r) − n model (r)]/n data (r). We note that both models fit well the data, in agreement with the χ 2 ν values of Fig. 11. The largest relative difference reaches 8% and is observed in the inner part of the filament. Beyond 2 Mpc from the spine of the filaments, the relative difference is less than 4% for both the GNFW and the double power law models, which additionally agree together quite well at these radii.

Conclusions
In this paper, we analyzed the filamentary structures of the Cosmic Web from the galaxy distributions of the TNG300-1 and MAGNETICUM simulations. These two simulations being different, we compare our findings and draw simulationindependent conclusions. We found the following main results: • For all the filaments, detected in both simulations, the galaxy density has the highest values near the core and decreases with increasing radial distance. The excess of galaxy density with respect to the background density shows a significance larger than 5σ up to 27 Mpc away from the core of the filaments. • Filaments of different lengths do not have the same galaxy density profiles. Independently of the simulation, Kolmogorov-Smirnov tests show that short (L f < 9 Mpc) and long (L f ≥ 20 Mpc) filaments constitute two different populations. While a good agreement between the simulations is found in the profiles of long filaments (modulo resolution effects at short radial distances), significant differences in the profiles of short filaments are detected. These differences might be explained by the particular sub-grid physics of each simulation (e.g. feedback effects), that are likely to play a significant role in the most over-dense environments. • Short (L f < 9 Mpc) filaments are denser, puffier (r 2 ∼ 5 Mpc), statistically more connected to massive objects and likely to be found in over-dense regions. They may be interpreted as bridges of matter between over-dense structures like clusters. These results are found to be simulation-independent.
• Long (L f ≥ 20 Mpc) filaments are less dense, thinner (r 2 ∼ 3 Mpc), statistically connected to less massive objects and trace under-dense environments. They may correspond to the filaments shaping the large scales of the Cosmic Web. These results are found to be simulation-independent.
• Empirical models like the GNFW profile, the β-model, the single and the double power law fit the galaxy density profiles of the two filament populations with different and distinct parameterisations for short and long filaments. The Einasto model is not adapted for the description of the galaxy density profiles of filaments.
These observations indicate that the short and long populations of filaments belong to different scales governed by different dynamical processes. In over-dense regions the dynamics of matter might be dominated by gravitational forces that pull matter from the lowest to the highest density zones, whereas in under- Fig. 13. Top: Fit-curves of short (orange) and long (blue) filaments. Solid and dashed lines correspond respectively to the GNFW (Eq. 4) and the double power law (Eq. 7) models. The fit curves are plotted using the parameters of Tables 2 and 3. Bottom: Relative difference of the fits with respect to the data, defined as: ∆n/n(r) = [n data (r) − n model (r)]/n data (r). dense regions the dark energy forces responsible for the cosmic accelerated expansion and stretching of the Cosmic Web might be dominant over the gravitational forces driving the collapse. An analysis of the velocity field around short and long filaments might be useful to unveil the dynamics and the evolution of these two different populations. Finally, the classification and characterization of filaments within a theoretical framework (e.g. Feldbrugge et al. 2018) is necessary to gain a more complete picture of these different populations.
We note that this study has used a topological definition of the filaments, given by the DisPerSE algorithm. A natural follow up of this work will be to see if these conclusions stand when detecting filaments with a different algorithm (e.g. from the velocity field). Moreover, further analyses on the properties of galaxies around bridges of matter and cosmic filaments (e.g. gradients of stellar mass, star formation rate, etc) can be useful to complement the present picture.
A&A proofs: manuscript no. main Density profiles of galaxies around filaments with different masks of the maximum density critical points: 1 × R 200 (green), 2 × R 200 (blue) and 3 × R 200 (pink). The gray curve represents the density profile without applying any mask. The horizontal thin lines represent the corresponding background galaxy densities after removing the masked galaxies.

Appendix A: Details on the mask of nodes
In this Appendix we give a more detailed explanation on the masking of the maximum density critical points, coinciding to the positions of the nodes, as explained in Sect. 3.3.
For the TNG300-1 simulation, in order to have an unbiased description of the density field, we use the dark matter particles to compute the radius R 200 of the spheres centered on the positions of the maximum density critical points (CPmax). We compute the R 200 radii by following an iterative scheme. For each CPmax we compute the density in spheres of increasing radii, until finding the radius for which the DM density equals 200 ρ c , where ρ c is the critical density of the Universe.
We compute radial density profiles (as explained in Sect. 3.3) with a mask of 1, 2 and 3 × R 200 , and we compare the resulting curves with the one without any mask. The profiles are presented in Fig. A.1. We can see that, the unmasked curve (grey) is 39 σ different from the 1 × R 200 masked profile (green), especially at the core of the filament. However, the differences between the 1, 2 or 3 × R 200 masked profiles are not significant as we get a stable signal, proving that a mask of 1, 2 or 3 × R 200 are equivalently good enough to remove the contribution from the clusters. Therefore, we make a conservative choice and adopt a 3 × R 200 mask in our analysis in order to avoid the contamination by other effects at the outskirts of clusters, like splash-back mechanisms (More et al. 2015), for example. We also note that the density backgrounds (horizontal lines) of the masked profiles are slightly lower than the unmasked one. This is due to the fact that masked profiles account for less galaxies in the same simulation volume.