WorksPhysics and Astronomy
Cosmic rays in galaxy halos I: the circumgalactic transport rate and a dynamically significant cosmic-ray reservoir
Abstract
Fermi-LAT observations imply that most of the cosmic rays (CRs) produced in normal star-forming galaxies escape from the discs where they are accelerated into the circumgalactic medium (CGM), but the subsequent evolution of those escaping CRs is unclear. Here we construct a simple semi-analytic model for their transport and loss, which we constrain by confronting the model with a series of observations: limits on CR energy densities in the outer Milky Way from Fermi-LAT, the isotropic gamma-ray background (IGRB), stacked CGM X-ray emission from eROSITA, and the requirement that the accumulated pressure of CRs in galaxy CGMs not be so large as to render them unstable. We show that these constraints can be jointly satisfied in only two scenarios: one where CRs diffuse quickly through the CGM and freely escape beyond it into the IGM, and another where the CR diffusion time out of halos is of order the Hubble time. In the latter scenario CRs accelerated by star formation naturally explain both the IGRB and the heat input required to maintain the temperature of the CGM against X-ray cooling, and their relatively slow transport means that roughly half of the CR energy injected into the CGM of an halo over its star-formation history remains there at . This makes CR pressure dynamically significant, and also means that a non-negligible part of the IGRB is produced by CRs in the Milky Way's own halo. We argue that this latter scenario is the more likely one, as it avoids the need to posit a second source for the IGRB that is coincidentally very close in both power and spectral shape to the contribution from star-forming discs.
Introduction
Cosmic ray (CRs) accelerated by star formation are dynamically important in the interstellar media of star-forming galaxies (Parker 1966; Socrates et al. 2008; Zweibel 2017; Krumholz et al. 2020; Crocker et al. 2021; Ruszkowski & Pfrommer 2023). A natural next question is: What about CRs in the circumgalactic medium (CGM)? Does the fraction of CR power that escapes galactic discs accumulate late in the CGM, modify the CGM pressure gradient, heat halo gas through streaming losses, or radiate hadronically at an observable level? Here we show that the answer is, at least potentially: yes.
Review of observational constraints
This conclusion is unobvious, and is the subject of this series of papers, because constraints on CRs in the CGM are scarce and hard to interpret. Observationally, the most direct tracer of CR protons and heavier ions is the hadronic (pion-decay) -ray emission they produce in collisions with ambient gas. On disc scales, this emission shows that the densest starbursts are near-perfect calorimeters for CR protons, but that in normal star-forming galaxies only of CR protons interact before escaping into the CGM (Thompson et al. 2007; Lacki et al. 2010; Strong et al. 2010; Mineo et al. 2012; Kor necki et al. 2020; Krumholz et al. 2020, 2023; Roth et al. 2021, 2023, 2024).
However, their subsequent fate has proven difficult to determine. Once CRs escape from these denser interstellar medium (ISM) and reach the much more diffuse CGM, observing them becomes difficult because the expected surface brightness is low and the foregrounds severe. Measurements of the -ray emissivity of gas in the outer Milky Way provide some limited constraints (Acero et al. 2016; Yang et al. 2016; Pothast et al. 2018), but thus far the only claimed detections of extragalactic CGM -ray emission are for M31 (Karwin et al. 2019; Recchia et al. 2021; Roy & Nath 2022a) and from stacking (Pshirkov & Niznamov 2026). However, the uncertainties are very large and even the source of emission (e.g., hadronic versus leptonic) is uncertain. Recent cosmological simulations that follow CR transport predict extended -ray — and associated soft X-ray inverse-Compton — halos at potentially detectable levels (Hopkins et al. 2025; Ponnada 2025; Ponnada et al. 2026; Lu et al. 2026). However, these methods are necessarily degenerate: the hadronic yield is set by the product of the CR and gas densities, so halo -rays constrain that product and not either factor by itself. Consequently, it has not yet proven possible to draw general conclusions from these limited data.
The fate of CRs in the CGM is also constrained by the isotropic -ray background (IGRB; Ackermann et al. 2015), which bounds both emission from the Milky Way’s own CGM and the collective output of CR protons in external galaxies, whether it arises in discs or halos. For the former, the possibility that the MW CGM contributes appre-
© 2026 The Authors ciably has been raised (Feldmann et al. 2013), and Liu et al. (2019) show that the IGRB already bounds the Galactic CR luminosity and the halo baryon budget, depending on the diffusion coefficient. For the latter, Roth et al. (2021) show that galaxy discs and their CGMs cannot be full proton calorimeters because, if they were, the total -ray output of star-forming galaxies would exceed the IGRB (see the curve of fig. 4 of Roth et al. (2021)); a significant fraction of the CR protons accelerated over cosmic history must instead lose their energy non-radiatively (e.g., via streaming) or survive to the present. As for individual halos, however, conclusions stronger than upper limits are troubled by the same degeneracy: the IGRB constrains only the product of the CR proton and CGM gas densities.
CR electrons offer further constraints in principle. Radio synchrotron halos around star-forming galaxies trace the CR-electron population and its transport out of the disc (Beck 2015; Heesen et al. 2018, 2023), and Faraday rotation of background sources probes the CGM magnetic fields on which those electrons radiate (Bernet et al. 2008, 2010; Mao et al. 2010), partially breaking the electron–magnetic-field degeneracy that is the analogue of the proton–gas degeneracy above. Radio halos and relics, rotation measures and -ray limits have long constrained CR populations and magnetic fields in cluster atmospheres (Carilli & Taylor 2002; Enßlin et al. 2011; Brunetti & Jones 2014), but applying these techniques to the far dimmer emission of lower-mass halos is in its infancy. In soft X-rays, eROSITA detects emission around halos extending further than purely thermal models predict (Predehl et al. 2021; Zhang et al. 2024a,b), prompting the suggestion that inverse-Compton emission from CR electrons contributes (Hopkins et al. 2025; Lu et al. 2026); however, this hinges on the claim that the emission cannot be thermal, in turn dependent on uncertain models of galactic winds.
Independently, UV and X-ray absorption-line studies of the cool and warm-hot CGM also constrain CRs indirectly, through their contribution to the total pressure (Werk et al. 2014; the O viii analysis of Roy & Nath 2022b). Phenomenological models calibrated against COS-Halos O vi and Milky Way O vii and O viii absorption and emission suggest that galaxy CGMs contain massive, comparatively long-lived reservoirs of hot gas supported roughly equally by thermal pressure, turbulence, and magnetic and CR pressure (Faerman et al. 2017, 2020, 2022) — an inference from the gas ionisation state that is independent of the route we pursue here.
Review of theoretical models
Theoretically, the case that CRs matter in the CGM is strong but model-dependent. Galaxy-formation simulations that follow CR transport find that CRs can come to dominate the pressure in the inner CGM, flatten its gas density profile, and drive or reshape galactic winds (Ji et al. [37]; Butsky et al. 2023; Hopkins et al. 2021; Pakmor et al. 2020; Yamasaki et al. 2024); see Ruszkowski & Pfrommer (2023) for a review. However, these outcomes depend sensitively on the assumed CR transport — whether streaming- or diffusion-dominated, and on the effective diffusivity — which remains uncertain at the order-of-magnitude level and is set by poorly-constrained micro-scale plasma physics (Zweibel 2017; Hopkins et al. 2022; Reichherzer et al. 2025; Habegger et al. 2026).
Pinning this transport down empirically, across the range of halos that contribute to the integrated signals, is precisely what the halo-scale -ray data can do — provided the comparison is made in a framework that respects the time-dependence of the problem. CR transport and loss times in the CGM are often comparable to halo growth times and to cosmological lookback times, so the CR hadron population inherited by a halo at low redshift depends on the coupled
evolution of halo mass, host-galaxy star formation, halo gas structure, and CR transport, and cannot be assumed to be in steady state. Moreover, the uncertainty about CR transport is also tied to the question of how gas is arranged within the CGM: CRs can alter this distribution via their pressure, but at the same time the gas distribution strongly affects the observable emission, with models in which CR transport is slow and CGM gas is highly concentrated toward central galaxies yielding vastly higher emission than those where either CR transport is faster or CGM gas less concentrated.
Goals and plan for this series of papers
Here we set out a mathematically coherent treatment of CR transport and energy loss in the halos of galaxies that is capable of generating predictions that we can compare to the observational and dynamical constraints we have discussed. We focus on CR protons, which dominate the energy budget, and for brevity from this point forward we will drop the ‘proton’ qualifier, so the generic term CR refers to CR protons unless otherwise specified. Our model combines (i) an evolving halo-plus-galaxy framework, (ii) a host-galaxy CR injection and escape model informed by CONGRuENTS (Roth et al. 2021, 2023, 2024), and (iii) a redshift-dependent transport equation for CRs propagating through a cored CGM gas profile under several boundary-condition assumptions that span the range of physically plausible scenarios. Our implementation treats macroscopic CR transport and halo gas distributions via parametrised functions agnostic as to the detailed physics underlying them, allowing us to marginalise over these uncertainties while still asking the question: does there exist a model that satisfies the totality of empirical constraints?
This paper (Paper I) is the first of a series of three. It describes our model and its immediate implications for the energetics of galaxy halos and -ray budgets, adopting empirically motivated fiducial parameters. Paper II develops the multi-messenger signals generated by the resulting population of CRs, and Paper III the implications of our findings for the physical model of CR transport in the CGM, showing that the totality of the observational constraints sets limits on the transport rate and hints at particular classes of transport model.
The remainder of this paper is organised as follows. In § 2 we detail the empirical constraints we use to decide which models are viable, and why; in § 3 we introduce our model for CRs in the CGM, including halo growth and star formation, CR injection, and CR transport and loss; and in § 4 we confront models with the observations to determine what range of models matches them. We discuss the implications of the observational constraints in § 5, and summarise and conclude in § 6.
Empirical constraints
We begin by cataloguing the empirical constraints we use to evaluate our models: the IGRB (§ 2.1), the X-ray luminosity of -galaxy CGMs (§ 2.2), the -ray luminosity of the outer Milky Way disc (Section 2.3), the pressure balance of CGMs (§ 2.4), and the stability of halo virial shocks (§ 2.5). § 2.6 gives a qualitative picture of how they fit together and why their combination pins down the fate of CRs in the CGM.
The IGRB
As discussed in § 1, the brightness of the IGRB sets one important constraint on the fate of CRs: if all the CRs produced by SFRs over cosmological star formation history were to lose their energy to collisions, or if too many CRs were to survive in the MW CGM at the present day, the resulting -ray luminosity would significantly exceed the observed IGRB.
Quantitatively, we adopt the model-A IGRB data of Ackermann et al. (2015), and from these data we reconstruct the integrated all-sky IGRB energy flux in the 1–10 GeV band, including the partially overlapping edge bands at 1 and 10 GeV. We focus on the 1–10 GeV range because these energies are largely unaffected by -opacity effects, thereby removing any dependence of our results on a choice of model for the extragalactic background light. We first convert Ackermann et al.’s tabulated photon intensities to energy fluxes assuming a within-band power-law spectrum with photon index , consistent with the model-A spectral fit of Ackermann et al. (2015), and then sum the per-band fluxes over the 1–10 GeV interval. This gives a central estimate . Propagating in quadrature the tabulated model-A statistical/instrument uncertainties across the contributing bands gives , and doing the same for the tabulated foreground-modelling uncertainties gives an asymmetric systematic uncertainty ; for simplicity we ignore the fact that foreground modelling errors are somewhat correlated across bands, an effect that if included would somewhat broaden the uncertainties. Because the systematic uncertainty is asymmetric and does not naturally behave as a Gaussian “” error, we do not fold it into a single effective variance when comparing against observations. Instead, for an upper-limit style exclusion test we define an allowed flux
all for the 1–10 GeV band. Models for which the predicted integral 1–10 GeV flux exceeds are considered excluded by IGRB overproduction.
In addition to this exclusion test, we also assess whether models are sufficient to explain the IGRB by evaluating whether their predicted IGRB luminosity (again summing the contributions from the Milky Way’s own CGM, extragalactic star-forming discs, and extragalactic CGMs) reaches the lower edge of the observed IGRB. Quantitatively, the flux required to meet this requirement is , which evaluates to . Note that in evaluating we adopt the larger (upward) foreground-modelling uncertainty, , rather than . This lowers the threshold and so admits more of the parameter space; with , would rise to . While we assess whether models are sufficient to produce the full IGRB, we do not exclude those that are insufficient, because there is considerable debate in the literature about the relative contribution of star-forming galaxies versus other sources (largely blazars) to the IGRB (e.g., (Zeclhin et al. 2016; Manconi et al. 2020; Eckner et al. 2025)).
CGM X-ray luminosities
If CRs that enter the CGM dissipate their energy via non-radiative loss mechanisms, most prominently the streaming instability, this power must eventually emerge as thermal radiation from CGM gas. The observed luminosity of this gas then sets an upper limit on the rate at which CRs can dissipate energy non-radiatively. We derive our upper limit from the eROSITA stacking analysis of Zhang et al. (2024b), who report the mean rest-frame 0.5–2 keV luminosity of CGM, , within a radius inside which the mean density is 500 times the critical density (compared with 200 times the mean matter density, which defines the virial radius and halo mass throughout this paper; § 3.1). They report this value as a function of the halo mass within this radius over a range . For the purposes of our analysis, we interpolate their tabulated values of as a function of , together with the uncertainty on the stacked mean luminosity converted from linear to logarithmic coordinates, to generate a predicted X-ray luminosity as a function of present-day halo mass , self-consistently accounting for the difference between and based on our adopted halo density profile and concentration parameter (see Appendix § 9). For a present-day halo mass we have , and our interpolation procedure gives with an uncertainty of dex.
In analogy with our treatment of the IGRB, we consider a model to be excluded by the observed CGM luminosity if it predicts that the CGM X-ray luminosity , where , with and taken from our fit to Zhang et al. (2024b). For a Milky Way-mass halo, , this evaluates numerically to . We may also adopt the hypothesis that the CGM is in fact heated primarily by the non-radiative dissipation of CR energy, in which case we expect the CGM luminosity to be approximately equal to the rate of non-radiative CR losses, rather than an upper limit to it. In analogy with our treatment of the IGRB, we therefore consider non-radiative losses sufficient to explain the observed X-ray emission from the CGM for a given model if the predicted X-ray luminosity is within the range , which evaluates numerically to .
This scenario for CGM X-ray emission is quite distinct from the model of Hopkins et al. (2025), in which CGM X-rays are inverse-Compton emission from CR leptons. Although both invoke CRs as the ultimate power source, they predict different spectra: a line-free, non-thermal spectrum in the Hopkins et al. model, but here the normal complement of lines from a thermally emitting plasma, since CRs dissipate their power into heat.
-ray emission from the outer Milky Way
The -ray emissivity of hydrogen in the outer Milky Way disc is constrained by Fermi-LAT measurements of -ray emission combined with 21 cm maps of neutral hydrogen emission, where the velocity can be mapped to a kinematic distance assuming a disc rotation curve (Acero et al. 2016; Yang et al. 2016; Pothast et al. 2018). Since these data constrain the emissivity per H nucleon, they set an upper limit on the CGM CR energy density in the vicinity of this gas – an upper limit only, since most of the emission from this gas likely arises from a disc component of CRs rather than from CRs in the CGM interacting with gas in the disc. We take our estimates of the CGM CR energy density to be from 1–10 GeV and above 10 GeV at (Yang et al. 2016). We place our maximum allowed energy densities at the upper limits, i.e., we consider a model to be excluded if it predicts , where from 1–10 GeV and at eV. Unlike with the CGM and IGRB constraints, we do not define a corresponding sufficiency condition, since in practice we do not expect to be dominated by CGM CRs, but by CRs produced locally in the disc.
Our approach to these data differs considerably from that of Hopkins et al. (2022, 2025), who treat the observed emission as a conconstraint on the CGM surface brightness at a projected radius equal to the kinematically inferred disc radius. This implicitly treats -rays from disc CRs interacting with disc gas as quasi-spherical emission from CGM CRs interacting with CGM gas, which seems questionable, particularly because the inferred CR spectrum is very soft ((Pothast et al. 2018)), as expected for a disc population and inconsistent with the harder spectrum expected for CRs in the CGM. Treating these data as upper limits only is a far more conservative — and in our view more defensible — approach.
CGM pressure balance
Another constraint is that CR pressure in galactic CGMs cannot grow so large that it prevents gas from achieving hydrostatic balance, at least in halos massive enough that we expect the CGM to be quasi-hydrostatic. Specifically, if the CR energy density (integrated over all CR energies) is , there is a corresponding pressure (assuming the CRs are predominantly relativistic), and we can define the fraction of the hydrostatic pressure provided by CRs as
where is the radius within a halo, is the gas density, and is the gravitational acceleration. We defer a discussion of how we compute in practice from our model to the next section, but we consider any model for which the predicted value of exceeds unity for an halo () at to be excluded on the grounds that the CR energy density would be too high to permit the existence of a hydrostatic CGM. Note that this is a generous choice, since corresponds to the CGM being supported entirely by CR pressure, with zero contribution from thermal, magnetic, or turbulent pressure.
Virial shock confinement
In addition to the pressure gradient of CRs within halos, in models where CRs are assumed to be confined by a virial shock (cf. § 3), we require that the CR pressure at the virial radius not exceed the ram pressure of cosmological infall onto the halo, . We defer a discussion of the numerical implementation of this constraint in the context of our model to § 3.6.
Combined constraints
The constraints we have outlined combine usefully because they bound the problem from complementary directions. That galaxy discs are not perfect CR calorimeters sets a lower limit on the rate at which CRs enter the CGM; the question then becomes how they exit. There are four possibilities: escape into the intergalactic medium (IGM), loss via radiative mechanisms, loss via non-radiative mechanisms, and no loss at all, i.e., the CRs that entered the CGM over cosmic time are still there today.
Each possibility is constrained by one or more of our conditions. The IGRB (§ 2.1) limits the fraction of CRs entering the CGM that can dissipate their energy in collisions, which produce observable -rays. Non-radiative losses that heat the CGM are constrained by CGM X-ray luminosities (§ 2.2). The possibility that CRs have simply accumulated and are still resident is limited both by the -ray emissivity of gas in the outer Milky Way disc (Section 2.3) and by the requirement that the accumulated pressure neither disrupt the CGM (§ 2.4) nor prevent formation of an assumed virial shock (§ 2.5). We will see that the combination of all these conditions eliminates a significant portion of the parameter space for CR transport and yields circumstantial evidence for a specific scenario.
Model
Here we describe our model for CRs in the CGM, which we have built to take advantage of the constraining power offered by the observations summarised in § 2. In our model we consider a spherically-symmetric CGM through which CRs propagate and with which they interact to produce observable emission. To develop this model, we first introduce a treatment of cosmological halos and their baryonic – stellar, ISM, and CGM – contents, which serves as a backdrop for our CR transport model (§ 3.1). We next introduce a model for CR boundary conditions: the rate at which CRs are injected by the central galaxy, and what happens when they reach the edge of the halo (§ 3.4). With the background and boundary conditions established, we then introduce our CR transport equation and our numerical method for solving it (§ 3.5). Finally, we explain how we go from a solution to the model to a prediction for each of the empirical constraints (§ 3.6).
Cosmological halo evolution
Here and throughout this work we adopt a flat Planck cosmology (Planck Collaboration et al. [65]) with present-day matter and cosmological constant densities and , baryon fraction , spectral index , density variance , CMB temperature , and present-day Hubble constant with . For this cosmology the present-day critical density is , the mean cosmological matter density evolves as , and the Hubble parameter evolves as . Cosmic time and redshift are related via the usual .
The dark matter component
Within this cosmology we follow the evolution of a halo of present-day dark matter mass using a Neistein-Dekel style growth formalism ((Neistein & Dekel 2008; Bouché et al. 2010)), whereby the time evolution of the halo mass is given by
where and . We generate tracks of , the mass as a function of redshift for a halo of present-day mass , by numerical integration of equation (3). The virial radius is
We limit our calculations to halos with present-day masses , a range over which this approximation is reasonable, and which dominates cosmological star formation.
To generate predictions for cosmologically-integrated quantities such as the IGRB, we also require a halo mass function. We follow Tinker et al. (2008) by adopting a comoving halo number density
where is the present-day comoving matter density, is the variance of the linear density field smoothed on the scale enclosing mass , and is an empirical fitting function. We adopt the coefficient set , corresponding to Tinker et al.’s spherical-overdensity case. The density variance is separable to good accuracy over the redshift range of interest, , with the linear growth factor normalised to . We evaluate directly from the linear matter power spectrum , smoothed with a top-hat window on the scale enclosing the mass, , where is the zero-baryon transfer function of Eisenstein & Hu (1998), which is accurate to for our cosmology. The normalisation is fixed by requiring at .
The baryonic disc component
We assign stellar masses and star formation rates to halos using a slightly-modified version of the redshift-dependent stellar-to-halo mapping from Behroozi et al. (2013). Specifically, we take the stellar mass for a halo of mass at redshift to be given by
and the corresponding star formation rate to be , where the prefactor approximately accounts for stellar mass returned to the ISM (van Dokkum et al. [99]). Here
and the quantities , , , , and are redshift-dependent fitting functions that we take directly from the code implementation of Behroozi et al. The final term in equation (6) is a regularising term that we add to the Behroozi et al. formalism:
This term makes almost no difference to itself, but has the important effect of ensuring that remains positive-definite, whereas in the unmodified Behroozi et al. model it becomes slightly negative for halos with masses at , giving a physically-impossible negative star formation rate. We choose our functional form for purely empirically so the star formation rates we obtain for halos and the total cosmological star formation rate density at match observations reasonably well, something we demonstrate below.
In our model we will also require an estimate for size and gas mass of the central galaxy. Following Forbes et al. (2014) and Krumholz et al. (2018), we adopt a disc radius with .2 We then infer the ISM gas mass from the inverted Kennicutt–Schmidt relation as implemented by Roth et al. (2021, 2023):
The CGM
Finally, we assign all the remaining baryonic mass to the CGM,
We assume that within the virial radius this gas is distributed in a cored powerlaw profile
for , where is a dimensionless radius and the index is left as a free parameter. This index must be the range for the enclosed mass and column density to be well-behaved; the common isothermal assumption corresponds to .
The choice of normalisation is subtle because it is tied to the question of how gas near the virial radius is structured, a topic on which the literature has not yet converged. The spherical stability analysis of Birnboim & Dekel (2003), extended by Dekel & Birnboim (2006), predicts that only halos with mass are bounded by virial shocks (at ), while some simulations find a shock-bounded hot halo already above (Fielding et al. 2017) and others find that the inner CGM virialises only once exceeds (Stern et al. 2021), and even then that the outer CGM develops a non-hydrostatic configuration rather than a sharp spherical shell (Lochhaas et al. 2023). The presence or absence of a shock can also be affected by CRs themselves: Ji et al. (2021) find that in Milky Way-mass halos at the virial shock is suppressed altogether once CR pressure dominates the thermal pressure because infalling gas is decelerated gradually by the CR pressure gradient and remains subsonic out to and beyond . Their runs adopt , within the range we infer below (§ 4.2), so the character of the outer boundary is itself partly contingent on the CR content we set out to measure.
For this reason, we do not adopt a preferred configuration, and instead consider three distinct scenarios for the CGM density profile outside , and for the closure radius , defined implicitly as the radius for which
We name each scenario after the cosmic-ray outer boundary it implies (§ 3.4). Our scenarios are:
TRAPPINGMAX: this is the simplest case, in which we assume that there is a virial shock present, and that this shock is able to confine the full baryonic mass of the halo to within the virial radius. In this case we adopt and , which in turn fixes the value of . We refer to this as the TRAPPINGMAX case because it maximises the density interior to .
TRAPPINGMIN: in this case we assume that a virial shock exists, but that some of the CGM mass is outside it so that . The mass outside has a powerlaw density profile similar to that of the interior mass, , and the inner and outer density normalisations and are related implicitly by requiring that , i.e., there is a factor of four density jump across the virial shock, as expected for a strong shock in adiabatic gas. We then minimise the density into by taking to be the radius at which the density falls to the mean matter density of the Universe, i.e., we require . This condition together with the integral requirement given by equation (12) constitute two equations in the two unknowns and , which we can solve numerically and thereby obtain the full density profile. The fraction of the CGM mass interior to the virial shock, and thus reduction in the value of for this scenario compared to TRAPPINGMAX, depends on the choice of and (very weakly) on the halo mass – for , we find numerically that , and that ranges from as we vary from 1 to 3.
FREEESCAPE: in this scenario we assume that there is no virial
shock, and thus the inner density profile given by equation (11) continues unchanged past . We then set the value of to that at which the density falls to ten times the mean matter density of the Universe, i.e., . This condition in turn requires , where , and using this value of in equation (12) then determines .
Numerical validation
To validate that our prescriptions produce reasonable outcomes, and give a qualitative overview of what they predict, in Figure 1 we plot the time evolution of the halos mass, stellar mass, ISM mass, and CGM mass (both total and only that inside ) for present-day halo masses , and . We see that the outcomes are qualitatively reasonable: the present-day stellar mass for a Milky Way-like halo, , is a few times , and the present-day ISM mass is of this. The ISM mass reaches near-equality with the stellar mass at . More massive halos are very ISM-poor at , and reach ISM-stellar equality at higher , while the remains gas-dominated even at .

Figure 1. Redshift evolution of the masses of the various halo components within our model normalised to the present-day total mass of a halo, , for three different present-day halo masses. The two lines “tot CGM” and “min CGM” correspond to the total (equation (10)) and to the mass inside in the TrappingMin scenario with , respectively.
We can also verify that our prescriptions produce reasonable outcomes for the integrated star formation rate density of the Universe:
We evaluate this integral over the fiducial range covered by our models, , and plot the results in Figure 2. For comparison, we also show the cosmological star formation rate density estimated by Madau & Dickinson (2014) converted to a Chabrier (2005) IMF. The figure shows that our simple analytic model agrees with the observations to within over , which is the range of greatest importance for our calculations. The disagreement between the true star formation rate and that predicted by our model at is likely due to our omission of halos smaller than , while the divergence at is likely because the fixed Tinker et al. (2008) coefficients we have adopted for our halo mass function become unreliable at higher . We do not attempt to correct for this offset because halos beyond make a negligible contribution to the quantities of interest for us.

Figure 2. The cosmic star-formation history of the Universe predicted by our model (solid blue line) compared to the observed cosmic star formation history Madau & Dickinson (2014) converted to a Chabrier (2005) initial mass function (dashed orange line).
Cosmic-ray injection and boundary conditions
The second ingredient in our model, which sits on top of the halo evolution component, is a prescription for the injection of CRs into the CGM and their behaviour once they reach .
A well-defined virial shock is anticipated (Enßlin et al. 2011) to define a trapping boundary for GeV-scale CRs, so the CR outer boundary mirrors the three CGM scenarios of § 3.3. In TrappingMax and TrappingMin the virial shock sits at and confines the CRs there (even in TrappingMin, where some CGM gas lies outside it), so we adopt a zero-flux boundary condition at . In FreeEscape there is no virial shock and CRs escape freely into the IGM: the domain is the whole CGM, from to , with a free-escape boundary at . The precise mathematical form of each boundary condition is given in § 3.5.
CR injection and the inner boundary
The inner boundary condition in our model describes the rate at which CR proton energy escapes from the ISM into the CGM. Here we adopt a fiducial relativistic CR proton energy release per core collapse supernova (CCSN) of erg, of the supernova’s mechanical energy release (e.g., Crocker et al. 2021, and references therein). If CCSN require progenitors of zero-age main sequence mass of at least and we adopt a Chabrier (2005) IMF, then the canonical CR-proton energy yield per unit stellar mass formed is
The total, relativistic hadron CR power accelerated by ongoing star formation then scales with the star-formation rate as .
The remaining quantity needed to finish specifying the boundary conditions is the calorimetry fraction , defined as the fraction of this power that is lost the dense galactic disc before it enters the CGM. In the framework of our model, is parametrised, at any particular epoch , by , the stellar mass, star formation rate, and disc radius (which affects the gas surface density) that we assign to a particular halo mass . In reality is almost certainly a function of CR energy as well, but we will neglect this complication and adopt a single energy-averaged calorimetry fraction.
To construct our effective , we start from the model implemented in the CONGRuENTS code, which predicts the energy-dependent calorimetry fraction as a function of , and which has been shown to faithfully reproduce the observed -ray spectra of local galaxies, the FIR- and FIR-radio correlations, and the IGRB (Roth et al. 2021, 2023, 2024).3 Our method for reducing this energy-dependent to a single effective number is as follows: for a given , CONGRuENTS predicts both the injected CR proton spectrum and the corresponding escaping CR proton power spectrum,
From these we define an effective energy-weighted escape fraction by introducing a spectral tilt parameter and a renormalisation factor , and then an effective energy-averaged calorimetry fraction
where . A positive gives greater weight to lower-energy CRs and tends to increase the effective disc calorimetry. The factor compensates for this by multiplying the overall energy-averaged calorimetry fraction by a factor that is slightly smaller than unity to keep the total disc contribution to the IGRB unchanged.
We calibrate the parameters so that our prediction of the disc contribution to the IGRB from 1 to 10 GeV agrees with the numerical predictions of CONGRuENTS, rescaled to our own cosmic-ray yield and star-formation history; the full procedure (Appendix B) yields and , which we adopt throughout. With these choices, our simplified energy-independent reproduces the rescaled, fully energy-dependent CONGRuENTS prediction to over the 1–10 GeV energy range on which we focus here.
In principle once we have fixed our calibration of , we could use equation (16) directly to compute the inner boundary condition for each halo at each in our model since, for any given halo mass-redshift pair , the model described in § 3.1 predicts . In practice this approach is too computationally-expensive, as it would require us to run CONGRuENTS for each case to generate the energy-dependent calorimetry fraction that enters equation (16). Instead, we adopt the approach of running CONGRuENTS on the CANDELS galaxy sample [100] (Grogin et al. 2011) – the same sampled used in the Roth et al. (2021) IGRB investigation – to generate a 4D data set of points. We then use the Mathematica function SmoothKernelDistribution to generate a kernel density estimate of the data that we can use for rapid evaluation of at any . The inner boundary condition for any halo of mass at is that the CR flux into the CGM is
where is evaluated for the of that halo as predicted by the model in § 3.1.
CR transport model
The last model piece is a prescription for CR transport in the CGM. In what follows, subscript p denotes particle-level quantities (e.g., for the energy of a single CR proton) and subscript c population-level quantities (e.g., for the CR proton energy density).
The transport equation
We treat the CGM as spherically-symmetric, and assume that the transport of CRs can be described, at least approximately, as a diffusion process. This approximation is valid even if microphysically CRs stream rather than diffuse along the field lines, as we expect to be the case in the CGM where the waves emanate primarily from the galaxy – or from the CRs themselves – and thus are highly anisotropic. This is because streaming plus field line random walk gives rise to approximately diffusive behaviour as long as magnetic fields are tangled on a scale smaller the size scale of the halo (e.g., Sampson et al. 2023), as predicted by simulations of CGM magnetic fields (e.g., Pakmor et al. 2020). However, we do retain a term to describe streaming losses. Under this assumption, the evolution equation for the CR population is
where is the radial position within the CGM. The first term on the right-hand side describes diffusion with coefficient , the second represents hadronic losses with timescale , and the third is the streaming-loss rate, with as the Alfvén speed in the gas. As usual for spherical diffusion equations, it is convenient to make a change of variables by defining , reducing the equation to a one-dimensional linear diffusion equation,
We expect that , , and will all vary with redshift , and that will vary with radius as the gas density varies. For , we adopt a deliberately-agnostic approach as to the nature of CR transport by simply parametrising the diffusion coefficient as
where is a dimensionless parameter whose value we will vary and is the sound speed in the CGM, which we compute assuming that the CGM is at the virial temperature of the NFW halo. Thus , the adiabatic sound speed with , where is the mean molecular weight for fully ionised gas and the virial temperature follows from the virial theorem, , with the gravitational self-energy of the NFW halo within (see Appendix § 9); for halo concentrations of interest , i.e. for at . This parametrisation is convenient because it isolates the physically relevant multiplier of the natural halo-scale diffusivity and is not tied to a particular microscopic model for CR transport.
The hadronic loss time, , from our CGM density profiles is
Here is the electron density, is the gas density as a function of and given by equation (11), is the mean mass per electron of a fully ionised plasma with hydrogen mass fraction , is the cross-section for hadronic interactions, and is the inelasticity. For the latter two quantities we adopt the Nakamura & Particle Data Group (2010) parametrisation of the total cross-section evaluated at GeV, mb, with inelasticity (the same effective values adopted in Crocker et al. 2021). Relative to a pure -on-hydrogen treatment using the inelastic cross-section ( mb at 10 GeV; Kafexhiu et al. 2014), this combination raises the effective hadronic emissivity per unit gas mass by a factor , placing it within per cent of a full accounting of the nuclear enhancement from He and heavier species in both beam and target ( pure ).
Finally, for we adopt , which corresponds to a plasma , consistent with numerical simulations of CGM magnetic fields in which the small-scale dynamo saturates at (e.g., Pakmor et al. 2017, 2020). We write this ratio as , where and are the sonic and Alfvénic Mach numbers of the CGM turbulence, with fiducial values and ; is taken to be constant with radius within any one halo. We explore variations in this choice, and show that the observational constraints in fact require to lie at approximately this value, in Paper III.
Non-dimensionalisation and boundary conditions
Our next step is to non-dimensionalise the transport equation as a prelude to solving it. The non-dimensionalisation requires some care because the boundaries of the problem are defined in terms of , which itself evolving with time.
Our natural length and time scales for the non-dimensionalisation are the virial radius and the diffusive timescale to reach the virial radius, . Formally, we define
where we remind readers that and , and thus and , are functions of both and . For our natural scale of energy density, which we require to non-dimensionalise , we use the present-day binding energy of the CGM gas the CRs sample (i.e., excluding material outside in the TrappingMin case), , divided by the volume inside , both evaluated at the present day. We define a time-independent surface-energy scale and the corresponding redshift-dependent energy density
where a zero in the subscript indicates that a particular quantity is evaluated at , and is a dimensionless function of order unity that depends on the choice of CGM boundary condition; we give an explicit form for this function in Appendix § 9.
With these choices, it is algebraically straightforward to rewrite equation (19) as
where is the dimensionless radius, is the dimensionless CR energy density times radius, the factors
are dimensionless Jacobians arising from the transformation from to as our time variable, and the two factors
can be thought of as measurements of the effective optical depth of the CGM to streaming and hadronic losses, respectively. That is, parametrises the ratio of diffusive escape time to the time required for a population of CRs to dissipate their energy into heat by streaming, while measures the ratio of the diffusive escape to the hadronic loss times. Because the factor in cancels the corresponding dependence on radius in and thus in (equation (21)), depends on , but not on .
We must solve equation (24) subject to the inner and outer boundary conditions described in § 3.4. At the inner boundary we require that the CR flux match that prescribed by CR injection, , where is given by equation (17). Converting this condition to our non-dimensional variables gives the Robin boundary condition
where
is the dimensionless CR energy injection rate.
At the outer boundary, for the TrappingMin and TrappingMax cases where we assume that a virial shock confines the CRs to the virial radius, we require that the CR flux vanish at . For the FreeEscape case we assume that the CR energy density falls to zero at the edge of the CGM, with the flux across the boundary then determined by the resulting gradient in the CR energy density. Translating these conditions to our dimensionless variables we have
for TrappingMin and TrappingMax, and for FreeEscape.
Numerical method
We solve equation (24) in Mathematica with a method-of-lines scheme and one-dimensional finite elements on the radial interval relevant to the chosen boundary mode. The radial mesh covers , with for TrappingMin or TrappingMax boundaries and for FreeEscape boundaries. To increase computational speed, we pre-calculate the various redshift-dependent parameters appearing in the equation – such as , , – on a common redshift grid, then interpolate while solving equation (24). All calculations begin at with throughout the domain, and continue to .4
From our numerical solutions we tabulate a series of useful diagnostic quantities at each redshift:
These quantities are, respectively, the instantaneous CR energy in the CGM, and the instantaneous rates at which CR energy is lost to streaming, hadronic collisions, and escape from the CGM (with the final term non-zero only for FreeEscape boundaries). We also integrate the instantaneous loss rates over time to produce cumulative losses over the full duration of our calculation. Using these diagnostics, we find that our numerical method conserves total CR energy to better than 2% in all cases.
For any given choice of the free parameters and describing the CR diffusion rate and CGM gas density profile, and a choice of boundary condition, we use the method above to generate solutions on a grid of present-day halo mass from 10 to 13 in steps of 0.25. This set of solutions then becomes the basis for our comparison to the empirical constraints, which we describe next.
Predictions for the empirical constraints
Once we have our grid of solutions over for a given dimensionless diffusion coefficient , CGM density index , and boundary condition (TrappingMin, TrappingMax, or FreeEscape), we generate predictions for each of the empirical constraints as follows.
The IGRB
For the IGRB, our point of comparison is the integrated all-sky flux over the 1–10 GeV band (§ 2.1). To predict this flux from our model, we sum three components: the contributions from external star-forming discs, , external CGMs, , and the Milky Way’s own CGM, .
For both extragalactic contributions the all-sky flux is
where is the halo number density as a function of halo mass and redshift (equation (5)), is determined for each halo’s mass and redshift from our tracks of halo growth (§ 3.1), is the gamma-ray luminosity of the disc or CGM, and is a bolometric correction to account for the fraction of emission that falls into the 1–10 GeV band. The factor combines the comoving volume element with the luminosity distance, .
We compute the disc -ray luminosity from our calibrated CONGRuENTS model as described in Appendix B, while we compute the CGM luminosity for each combination of and as
obtained from our numerical integration of the model (§ 3.5.3) and we adopt , corresponding to the standard approximation that roughly one third of the hadronic loss power ultimately emerges as photons through decay. We compute the bolometric corrections from the normalised shape of the emission spectrum (with ) as , where GeV and GeV. The spectral shape function depends on the momentum index of the protons responsible for driving the emission, defined so that the proton energy distribution is . We compute for a given from the differential cross sections provided by Kamae et al. (2006) and Kelner et al. (2006), as described in Appendix B; we then numerically integrate the expression above to obtain as a function of redshift. For the disc contribution to the IGRB, we adopt with as our adopted spectrum of the CRs at injection and the spectral softening of the disc emission due to preferential escape of high-energy CRs, calibrated to the full CONGRuENTS energy-dependent escape model (Appendix B). This energy-dependent escape, on the other hand, means that the spectrum of CRs escaping from galaxies into the IGM is, if anything, harder than the injected spectrum. We nonetheless adopt when computing the bolometric correction for CGM emission. The bias this introduces is small and of known sign: a harder spectrum places a smaller fraction of its photon power in the 1–10 GeV band ( falls by 15–20 per cent between and 2.1), so if the escaping spectrum is harder than injection our choice slightly overestimates the CGM contribution to the IGRB.
To compute the contribution from the Milky Way’s own CGM, , we first compute the volumetric, bolometric-corrected -ray emissivity of the CGM as a function of dimensionless radius as (c.f. equation (32))
where and are the dimensional scaling energy and timescale (Section 3.2.3), is our fiducial dimensionless radius for the inner edge of the CGM, is our numerical solution for the dimensionless CR energy density, and is our adopted CGM density powerlaw index. In these calculations we adopt for the present-day mass of the Milky Way halo (Wang et al. 2020), and we calculate all quantities at .
To convert this emissivity to a mean all-sky flux, we put the Sun at a dimensionless distance from the Galactic centre (with kpc; GRAVITY Collaboration et al. [29]). Under this assumption, the intensity observed at Earth along a line of sight at Galactic latitude and longitude is , where is the distance along the line of sight, , and is the cosine of the angle between the line of sight and the Galactic centre; we implicitly take for and , where for TrappingMin or TrappingMax boundaries, and for FreeEscape boundaries. Qualitatively, because of the Sun’s displacement from the Galactic Centre, is a monotonically decreasing function of .
It is tempting at this point to define simply by integrating over the full sky as seen from the Sun, but doing so would ignore important biases introduced by the way that the IGRB is measured from raw Fermi/LAT data and how these procedures interact with the dependence of on . First, estimates of the IGRB mask the region with to avoid the bright contribution from the Galactic Plane, thereby also excluding the region where is largest. Second, even after excluding this region, estimates of the IGRB use templates that decompose the emission into an isotropic component plus a Galactic foreground, and since is largest towards the inner Galaxy some of the flux from the Milky Way CGM may be absorbed into the foreground templates. For this reason we compute two estimates for that act as upper and lower bounds:
where is the solid angle of the unmasked portion of the sky. The estimate given by corresponds to assuming that none of the large-scale gradient is absorbed into the foreground template and is thus an upper limit, while the lower limit corresponds to assuming that only the minimum intensity present in any direction is retained, with the rest absorbed into the template. The two limits nearly coincide in FreeEscape and differ by a factor in the trapping modes.
To be deliberately conservative, we use both when determining which parts of parameter space the IGRB excludes and when quoting the predicted circumgalactic share of the IGRB (Section 5.2). Formally, we therefore consider a particular combination of parameters and CGM boundary condition to be ruled out if
where is our conservative upper limit given by equation (1).
CGM X-ray luminosities
CR streaming losses are dissipated as heat in the CGM, so in energy equilibrium (equation (31)) should not exceed the CGM bolometric cooling luminosity. Before comparing this to the observed X-ray luminosity, however, we must make a bolometric correction, since the observed luminosity only includes photons with energies in the range 0.5–2 keV. Following Mineo et al. (2012), we adopt a factor for this purpose, and we therefore take as our model prediction for the CGM X-ray luminosity.
We remind readers that our estimate of relies on the assumption that CRs in the CGM stream through the gas, and thus suffer losses at a rate . This in turn requires the presence of a net flux of Alfvén waves co-streaming with the CRs; under balanced extrinsic turbulence, or purely magnetostatic scattering, the thermostat does not apply and this constraint lifts.
-ray emission from the outer Milky Way
The ring emissivities of Section 2.3 probe the local CR energy density directly, rather than a projected surface brightness, so we compare them with the model’s CGM CR energy density (equation (23)) at kpc, for at . We apportion between the two bands using the fractions of the energy density of the adopted CGM proton spectrum that fall in each, counted, like our normalisation of , above the pion-production threshold ( and ). While we compare the model-predicted CR energy densities to the maximum allowed value in both the 1–10 GeV and GeV bands, in practice the harder band is the operative constraint for the spectrally hard CGM component.
CGM pressure balance
To evaluate the hydrostatic ratio (equation (2)) we reconstruct the CR pressure from the transport solution, with (equation (23)), and compare its gradient with the gradient , , required to support the adopted gas profile (equation (11)) in the halo potential. This is a stricter test than a global energetic argument because it asks whether the modelled CR population would over-support the gas locally at any radius. When the CR pressure gradient is dynamically subdominant and a hydrostatic gas configuration is self-consistent; when over an extended radial range the model has formally broken down.
Virial shock confinement
For the TrappingMin and TrappingMax boundary conditions, we also require that the CR pressure at not exceed the ram pressure of the gas accreting onto the halo, (§ 2.4), and we rule out any model that does not obey this constraint. We evaluate for smooth, spherically symmetric infall at . Gas arriving with the cosmic baryon fraction at the rate and speed has density , and so exerts ram pressure
Here we take from equation (3), and is the circular velocity at the virial radius (; § 3.5.1). For an halo at the model’s own accretion rate ( of baryonic mass, consistent with Fakhouri et al. (2010)) gives .
Results
Having explained how we generate our library of models and evaluate the observational constraints for them, we now present our results in order of increasing constraint complexity. We begin in § 4.1 by orienting the reader by walking through some representative outputs of our model for individual halos. Then in § 4.2 we describe our survey of parameter space, sequentially adding each observational constraint and identifying what each rules out.
Representative cosmic ray profiles
We show in Figure 3 and Figure 4 plots of the radial profile of the cosmic ray energy density in dimensional and non-dimensional terms for various representative parameter choices as returned by our Mathematica code. For the non-dimensional cases shown in the top rows of Figure 3 and Figure 4, rather than showing , we instead show

Figure 3. The unit-normalised radial profile shape of the CR energy density, as a function of (top row, panels a and b), and the corresponding dimensional energy density as a function of (bottom row, panels c and d), for the boundary mode TrappingMax, for the example case of a CGM gas profile index and a halo. Each curve in the top row is separately normalised to unit energy content (equation (40)), so panels (a) and (b) carry profile shape only; panels (c) and (d) show the corresponding amplitudes. Left column (a, c): the profile at fixed, dimensionless transport coefficient and for redshifts , indicated by the curve colours from blue to red (legend in panel a); right column (b, d): the profile at fixed and for various transport coefficients , as indicated by the curve colours (legend in panel b).

Figure 4. Same as Figure 3, with identical curve colour scheme and legends, but now for boundary mode FreeEscape and for the example parameter in the left column. Note that, for FreeEscape, the profile can extend beyond .
This removes normalisation differences between redshifts, making changes in the radial distribution easier to see.
Going from high (shown in red) to low (shown in blue) redshift, the left column figures show how, at fixed diffusion coefficient, the radial CR energy density evolves, typically from relatively steep to progressively flat. The right column figures compare profiles at for different diffusion coefficients. As might be anticipated, profiles evolving under comparatively smaller diffusion coefficients remain more compact and steep with a larger energy density at . For the largest values of , the profiles are very broad and flat in the case where there is a trapping boundary, and the energy density becomes independent of . By contrast in the case of a FreeEscape boundary, some radial gradient in the profile is maintained even for large , and the CR amplitude drops as rises. This latter boundary condition also allows, in general, the profile to extend beyond to where it goes to zero by construction.
We can understand these results intuitively. Under Trapping nothing escapes, and the only sinks are the losses within the halo, hadronic collisions and streaming. As rises, both become small: as the diffusion time becomes short, the interior of the halo homogenises, . This in turn suppresses both streaming and hadronic losses – the former because there can be no streaming losses when there is no pressure gradient to stream down (loss rate ), and the former because CRs rapidly escape from the denser CGM gas near the halo into the low-density outer halo. Consequently at the two together remove only a few per cent of the injected energy, so nearly all of the CR energy injected over all cosmic time remains in the CGM at . Further raising changes neither the normalisation nor the arrangement. By contrast for FreeEscape the shape becomes independent of for large , but the amplitude does not. In this limit the CR profile is set by the balance between injection and escape, and that balance goes on shifting with .
Parameter-space scans
Having built up some intuition for how the solutions behave, we proceed to generate solutions on a tensor product grid of the three possible boundary conditions (FreeEscape, TrappingMin, and TrappingMax), CGM density slope in steps of 0.1, and sampled uniformly in logarithm over 33 values from to , corresponding to a physical range for a halo at . We therefore have a total of 1881 parameter space samples, each of which is evaluated at 13 halo masses from as noted in § 3.5.3.
The TrappingMax case
We first start with results for the TrappingMax boundary condition to gain some intuition before moving on to the other boundary conditions. Figure 5 shows the results of applying the observational constraints to the parameter space for this boundary mode one at a time, so that their separate effects can be followed.

Figure 5. Observational constraints applied cumulatively in the plane for the TrappingMax boundary condition; the right vertical axis shows the corresponding physical diffusion coefficient for a Milky Way-mass halo at , . In this figure excluded regions are shown by shading, and sufficiency conditions by solid lines for central values with regions indicated by dashed lines in the corresponding colour. Starting from the top left and proceeding across and down, we progressively add the 1–10 GeV IGRB exclusion (light grey); the IGRB sufficiency condition (blue lines solid and dashed); the condition that the streaming losses fully explain CGM X-ray emission (green lines solid and dashed lines; the sufficiency line and exclusion region both lie outside the plot window); the region excluded by the observed CR energy density in the outer Milky Way (grey, across the bottom); the excluded region where and thus the CGM cannot be hydrostatic due to CR pressure (orange); and the condition that the CR pressure at the virial radius not exceed the ram pressure of cosmological infall (purple, above ). The various exclusions clearly require –; over most of this range CRs are sufficient to both explain the X-ray luminosity of the CGM (area between solid green and dashed green lines) and, for , the IGRB (area between the two blue dashed lines).
Starting at the top left panel, the requirement that the model not exceed the 1–10 GeV IGRB (§ 3.6.1) excludes a region in the lower right-hand corner, where transport is slow and the gas profile is steep and therefore highly centrally concentrated. Slow transport keeps the CRs in the dense inner halo, where the target gas is concentrated, so the predicted hadronic emission from external CGMs and from the Milky Way’s own CGM is greatest there. The top right panel then adds the region where the model satisfies the IGRB sufficiency condition outlined in § 2.1; everywhere between the dashed blue lines (with the solid line marking the central value of the measured IGRB), the -ray emission produced by a combination of extragalactic discs, extragalactic CGMs, and the Milky Way’s own CGM explains the observed IGRB to within .
We next consider the constraint from CGM X-ray emission (§ 3.6.2), which proves to be most constraining for halos with mass . We find that, even for these halos, the heating of the CGM by streaming never yields X-ray luminosities that exceed the observed one by over our parameter space, and thus none of space is excluded by X-ray data. However, we do find a region where CGM heating is sufficient to explain the observed X-ray emission within , which we mark by the green lines in the centre left panel. (A second heating–cooling balance contour lies at the far lower right of parameter space, but is wholly within the region already excluded by the IGRB.)
The fact that the model reproduces the observed CGM X-ray luminosity within everywhere over our broad parameter space is a reflection of the fact that the streaming loss rate depends only weakly on , largely due to a fortuitous cancellation: when is large the streaming loss rate is suppressed because the gradient flattens, as discussed in § 4.1, and so the streaming loss rate increases with , but only up to a point, because when is small CRs are confined close to the galaxy where the gas is dense, and hadronic losses begin to dominate, setting an upper limit on how much of the CR power is ultimately channelled into heating and thence X-rays.
Adding the constraints on the Milky Way circumgalactic CR energy density from the Fermi ring analyses of the outer Galaxy (Section 3.4.3) removes a horizontal swathe across the bottom of the plotted parameter space (grey; centre-right panel). The mechanism is that if CRs are transported too slowly then they remain concentrated in the inner halo, and the CGM contribution to the CR energy density at then exceeds the measured value — which, the rings being dominated by disc CRs, bounds that contribution from above (Section 3.4.3). Because these limits bound the CR energy density directly rather than a -ray flux, they depend only weakly — through the hadronic losses — on the adopted CGM gas density profile. And because they measure one halo — our own — rather than a sum over the halo population, the same limit is imposed nearly unchanged in every boundary mode.
We next add the constraint , so that the CGM can be approximately hydrostatic — as expected for and larger halos (e.g. Faerman et al. 2017; Stern et al. 2019; Singh et al. 2024). The region where anywhere within the CGM and hydrostatic balance is impossible indicated by the orange shading in the bottom left panel. We find two distinct regions that are forbidden by the hydrostatic condition: a corner at and low , and a wedge at and intermediate . These regions have distinct origins: the low-, low- corner becomes unstable at because this region of parameter space combines slow CR transport, which maximizes the CR pressure gradient in the inner halo, with a flat gas density profile, which minimizes gravitational force in the same region. By contrast, the high-, intermediate- part of parameter space violates the hydrostatic constraint much closer to . This region appears because at high baryons are concentrated in the inner CGM, lowering the gravitational force at larger radii, while for intermediate CRs escape quickly from the dense inner region without suffering too many losses, but still maintain a pressure gradient rather fully flattening as happens at still higher .
Finally, because we are showing the constraints for a trapping boundary condition, we have the requirement that the ram pressure of the virial shock be sufficient to confine the CRs (§ 3.6.5). This requirement fails to be met throughout the purple region (lower right panel), which begins at . Within this region the CR pressure at exceeds by a factor –, and the reflecting boundary the solution assumes could not be maintained. Within the surviving region, by contrast, by construction; confinement sets the region’s highest point for , while at lower the IGRB sufficiency condition lies below it.
Constraints for all boundary modes
We now repeat the exercise above for every boundary mode and show the result in Figure 6. Several features stand out.

Figure 6. Same as the final panel of Figure 5, but now showing constraints for each of the three boundary conditions, as indicated. The shaded regions and curves have the same meanings as in Figure 5.
First, there is a firm, mode-independent lower limit set by the Fermi ring limits at low and by IGRB overproduction at high . The former is only weakly dependent on the CGM gas profile, the latter on the halo population, and neither is particularly sensitive to the boundary condition. The fundamental reason for this insensitivity is that these constraints mainly apply in the inner CGM – the region from which the Fermi ring limits come and which dominates the IGRB contribution owing to its high gas density – where the solution is insensitive to boundary conditions.
The situation with respect to upper limits is more complicated and boundary-dependent. Most obviously, the requirement that the CR pressure not exceed infall ram pressure in the two Trapping cases, which eliminates most of the parameter space at high , does not apply if we assume that CRs prevent the formation of a virial shock entirely and can thus freely escape into the IGM. More subtly, we see that the two regions that are forbidden on the grounds of hydrostatic balance in the TrappingMax case become larger in TrappingMin, and still larger and overall overlapping in FreeEscape. The instability regions expand in these cases simply because for these boundary conditions there are fewer baryons inside the virial radius. This both weakens the stabilising gravitational force and reduces CR hadronic losses. The effect is largest for FreeEscape, which retains the fewest baryons within , dropping to only 5% of the CGM mass residing within for .
We therefore see that there are two classes of solution permitted by the observations. One exits only for the FreeEscape boundary condition, and corresponds to very large . The physical nature of this solution is that CRs rapidly escape into the IGM, driving negligible -ray or X-ray emission and providing negligible pressure. For this solution CRs are essentially irrelevant to the CGM.
The other class of solution is far more interesting. This region, characterised by and and allowed by all three boundary modes, is characterised by a suggestive confluence. Not only is it allowed by all the observational constraints, in this part of parameter space CRs in the CGM naturally explain both the heating of the CGM in galaxies, as constrained by the eRosita observations, and the IGRB, as constrained by Fermi observations. We emphasise that there is no a priori reason that these conditions should have coincided: the Milky Way ring analysis that rules out the low part of parameter space and the hydrostatic balance and confinement conditions that rule out the high parts are completely unrelated to the IGRB or CGM X-ray luminosity. The fact that all
these unrelated constraints and sufficiency conditions overlap in the same narrow swathe of parameter space is therefore very interesting.
Discussion
Having identified the CR transport regimes and CGM physical conditions that are ruled out by various observational constraints, we next work through the implications of these restrictions for quantities that are not directly observable. We examine the total CR energy budget in § 5.1, the contributions of different sources to the IGRB in Section 5.2, the role of CRs in providing heating and pressure support to the CGM in § 5.3, and the nature of CR transport in the CGM in § 5.4.
Here we will find it helpful to subdivide the remaining, allowed parameter space shown in Figure 6 into distinct regions. For the TrappingMax and TrappingMin boundary conditions, we distinguish between the entire allowed parameter space (the full unshaded region in the lower two panels of Figure 6), and the parts of that parameter space that meet the IGRB sufficiency condition (the part of the unshaded region that falls between the two blue dashed lines); we refer to these regions as TrappingMax[ALL] and TrappingMax[IGRB], and similarly for TrappingMin. Since there is near-complete overlap between the parts of parameter space that meet the IGRB sufficiency condition and those that meet the X-ray sufficiency condition (region above the dashed green line), we do not bother to distinguish meeting both conditions as a separate case. For FreeEscape, in addition to these two regions (FreeEscape[all] and FreeEscape[IGRB]), corresponding to the lower unshaded region in the top panel of Figure 6, we also have the upper unshaded region of large , to which we refer as FreeEscape[high]; we discuss the physical meaning and plausibility of this particular range of parameter space further in Section 5.5. We summarise the range in to which each of these regions approximately corresponds in Table 1.
| Quantity | Parameter space regions | ||||||
| TMax[all] | TMax[IGRB] | TMin[all] | TMin[IGRB] | FE[all] | FE[IGRB] | FE[high] | |
| Defining parameters | |||||||
| (1.1, 2.9) | (1.8, 2.9) | (1.5, 2.9) | (2.0, 2.9) | (1.1, 2.9) | (2.0, 2.7) | (1.1, 2.9) | |
| (−1.31, −0.72) | (−1.31, −0.72) | (−1.31, −0.72) | (−1.31, −0.72) | (−1.29, −0.59) | (−1.29, −0.65) | (0.03, 1.88) | |
| Percent of CR energy injected into an CGM over all time that by has gone into. . . | |||||||
| Hadronic loss | (2.1, 24) | (9.4, 24) | (13, 24) | (8.9, 24) | (2.3, 16) | (5.6, 16) | |
| Streaming loss | (34, 63) | (33, 58) | (35, 62) | (34, 58) | (37, 61) | (38, 60) | (0.02, 18) |
| Escape to IGM | - | - | - | - | (39, 100) | ||
| Still in CGM | (27, 57) | (27, 54) | (28, 58) | (27, 54) | (30, 59) | (31, 55) | (0.2, 14) |
| Percent of the observed IGRB contributed by. . . | |||||||
| Ex-gal CGMs | (2.4, 25) | (10, 25) | (1.2, 24) | (10, 24) | (2.5, 16) | (5.8, 16) | |
| MW CGM | (1, 49) | (12, 49) | (1, 49) | (12, 49) | (5.0, 56) | (16, 55) | (, 6.5) |
| CR energy and power dissipation in the CGM for at . . . | |||||||
| (0.12, 0.66) | (0.12, 0.27) | (0.13, 1.4) | (0.13, 0.31) | (0.16, 0.50) | (0.16, 0.31) | (, 1.0) | |
| (1.1, 1.9) | (1.1, 1.8) | (1.2, 1.9) | (1.2, 1.8) | (1.3, 1.9) | (1.3, 1.8) | (0.004, 0.56) |
Table 1. Table 1. Summary of properties for the regions of parameter space not ruled out by observational constraints. In the list of parameter space regions, TMax is short for TrappingMax and similarly for TMin, and FE is short of FreeEscape. The different sections of the table report the range in and covered by each region, the percentage of CR energy that reaches the CGM of an halo that has gone into each reservoir at , the contribution of different emission components to the IGRB, ... Entries formatted as give the minimum and maximum value of each parameter over the parameter space region, while entries of the form give an upper limit over the full region.
The cosmological cosmic ray energy budget
One output of our model is an answer to the budget question posed in the introduction: Where is all the energy that was injected into CRs as the Galaxy formed today? We answer this question in Table 1 and Figure 7, which shows the median result for how the CR energy produced over the star-formation history of an halo is partitioned today for a subset of our defined parameter space regions. Some 36 per cent of the energy is lost hadronically in the ISM before the CRs reach the CGM, independent of the CGM model. Of the energy injected into the CGM, in all regions except FreeEscape[high], two channels dominate: streaming losses, which heat the halo gas, take 45 per cent, and 27–55 per cent is still resident in the CGM at ; hadronic losses in the CGM take 10 per cent. By contrast, escape into the IGM is only significant for FreeEscape[high].
Figure 7. The fate of the CR energy produced over the star-formation history of a halo, for four of the allowed regions of parameter space (see Table 1). Each bar shows median energy going into each loss channel, as fractions of total CR production (bottom axis) and as fractions of the total CR energy that reaches the CGM rather than being lost in the disc (top axis). The reservoirs shown are hadronic losses in the ISM (first segment, 36 per cent, independent of the CGM transport since it occurs before injection), hadronic losses in the CGM, streaming losses in the CGM, escape into the IGM, and remaining in the CGM to the present. Because each segment is a median taken component by component, total bar lengths do not sum exactly to unity.
In absolute terms, for a halo our fiducial model accelerates erg in CR protons over all star formation since , and delivers erg (65 per cent) of this to the CGM after disc losses. Of this, in all cases except FreeEscape[high], it retains erg in the CGM at . For scale, this reservoir is an order of magnitude larger than the CR proton content of the Fermi Bubbles in a hadronic scenario ((Crocker & Aharonian 2011; Crocker et al. 2015; Tank et al. 2026)), erg for an ambient density and scaling as . It amounts to 12–32 per cent of the gravitational binding energy of the CGM (cf. § 5.3).
The persistence of significant CR energy in the CGM can be understood simply by examining timescales. The characteristic timescale for a CR injected at the halo centre to diffuse through its volume is determined by the time required for its three-dimensional random walk to cover a mean square distance ; this timescale is
Normalizing this to the Hubble time (§ 3.1) and simplifying gives
with no explicit dependence on halo mass. For our adopted and ratio (Appendix § 9), our allowed range of corresponds to , with only a weak dependence on redshift. We therefore see that the observational constraints pick out a model in which CRs are able to traverse a halo roughly once per Hubble time. It is therefore not surprising that a significant fraction remain within it, even for FreeEscape boundary conditions.
Where does the IGRB come from?
We can next use our model to identify where the IGRB comes from, decomposing it into contributions from extragalactic discs versus extragalactic CGMs versus the Milky Way’s CGM, and in terms of the redshift and halo mass distribution of the extragalactic component.
We report the total contributions from both extragalactic CGM emission and from the Milky Way CGM for each of our allowed regions of parameter space in Table 1; the disc contribution is fixed to by the calibration we adopt in Appendix B independent of CGM model parameters. We again see that the FreeEscape[high] region of parameter space is an outlier. In this case CRs escape from CGMs so quickly that there is negligible emission from them. Thus the of the IGRB not directly supplied by discs must come from -ray emission unconnected to star-forming galaxies. We return to the question of whether this is a realistic prospect in Section 5.5, but for now we turn to the more interesting cases.
For cases where we choose parameters sufficient to reproduce the observed IGRB (TrappingMax[IGRB], TrappingMin[IGRB], and FreeEscape[IGRB]), we see that emission from extragalactic CGMs accounts for of the IGRB; since extragalactic disc emission is , this means that CGM emission boosts the disc contribution by . The corresponding all cases simply extend the lower-edge of this range to somewhat lower values due to their lower values of , which place fewer baryons close to the galaxy where they are efficient targets for hadronic -ray production. We also see that the Milky Way halo makes a significant contribution of , with as a typical number. This is several times the estimated by Feldmann et al. (2013) for the Milky Way-like halo under a steady-state calorimetric model, and the reason for the difference is clear: for the range of parameters allowed by the observational constraints, a significant fraction of all the CRs ever produced over cosmological time are still present in the CGM (c.f. Table 1), and so the available energy budget to drive emission is significantly larger than the CR energy injected over a CGM crossing time as assumed in Feldmann et al.’s steady-state model — particularly since the star-formation rate of halos was substantially higher at earlier cosmological epochs.
We can see this effect more clearly by examining disc and halo -ray luminosity as a function of redshift and halo mass. We plot this in Figure 8 for the example point and with FreeEscape boundaries; this point lies close to the centre of FreeEscape[IGRB] region, and the results for it are representative of those throughout the IGRB region for all boundary conditions. We see that disc emission (dashed lines) peaks at for halos and for , roughly mirroring cosmic star formation histories for these halo masses, but dropping off more precipitously towards the present because both star formation rates (and thus CR injection) and are declining as the ISM becomes less dense. By contrast, CGM emission drops much more slowly because CRs reside in the CGM for long times, providing a delayed release of energy that was injected at earlier cosmic epochs when the star formation rate was higher. Thanks to this effect, at the present day the ratio of CGM -ray luminosity to disc -ray luminosity has risen to for halos, from a minimum of at the peak of cosmic star formation. Larger halos are even more extreme: the CGM -ray luminosity of exceeds the disc luminosity by almost an order of magnitude at , because star formation, and so CR injection, has effectively ceased while the CRs injected into the CGM at earlier epochs continue to radiate.

Figure 8. The -ray luminosity of the disc/ISM (dashed) and CGM (solid) of model halos with present-day masses (orange), (blue), and (green) , for the example parameters and , with FreeEscape boundaries.
The pattern of evolution shown in Figure 8 also dictates the distribution of redshift and halo mass that contributes to the IGRB. Both the disc and the extragalactic CGM contributions peak in Milky Way-scale and larger halos (–) near the epoch of most intense cosmic star formation (), with the CGM term weighted to somewhat more massive halos. The background is therefore dominated by -type galaxies near the cosmic star-formation peak, rather than by dwarf halos or by groups and clusters.
The CR contribution to the CGM pressure support
Cosmic rays can matter to the CGM in two logically distinct ways. The first is mechanical: if the retained CR energy is comparable to the gravitational binding energy of the halo gas, CR pressure contributes to its support and the gas cannot be in purely thermal hydrostatic equilibrium. The second is thermal: if the CR heating power is comparable to the halo’s radiative losses, cosmic rays can hold the gas against cooling. We examine these in turn.
To characterise the mechanical importance of CRs we compute the ratio , where is the total energy of CRs in the CGM integrated over all radii and is the CGM binding energy
energy (Appendix § 9). We report the range of this ratio for halos at over our allowed parameter region in Table 1. As with all other results in this section, in the FreeEscape[High] case the energy is small for most parameters in this region, although there is a small corner of parameter space where it can be relatively large. However, we will focus more on the other possible solution where CRs are not assumed to escape the halo rapidly. We plot as a function of and for a representative set of parameters in this region — , , with FreeEscape boundaries – in Figure 9.
Figure 9. Ratio of CR energy to gas gravitational binding energy in the CGM, , as a function of present-day halo mass at six redshift slices from (blue) to (red), for FreeEscape at ; the dashed horizontal line marks .
The figure shows that the ratio grows steadily with time for , reflecting the continuous accumulation of CR energy across the star-formation history; at it is roughly constant at late times, and above that mass it has declined from an earlier peak. By , Milky Way-mass halos reach , and – per cent across the IGRB regions of parameter space: CR pressure support is energetically significant in CGMs at low redshift. halos substantially more massive than remain well below the CR Eddington condition even after a full Hubble time of accumulation. Probes of the large-scale pressure profile — X-ray surface brightness, the thermal Sunyaev–Zel’dovich signal (Kim et al. 2022), and absorption-line diagnostics (Werk et al. 2014) — should in principle be able to confirm this prediction (Ji et al. [37]; Quataert & Hopkins 2025); indeed, O VIII absorption has already been used to bound the CR-to-thermal pressure ratio in the Milky Way CGM (Roy & Nath 2022b).
Turning to the thermal importance of CRs, in Figure 10 we compare the streaming power delivered to the CGM by CRs at as a function of halo mass to the observed X-ray luminosity as a function of halo mass (c.f. § 2.2) divided by our adopted bolometric correction factor (c.f. § 3.6.2); this plot uses the same set of example parameters as in Figure 9. We also report the ratio for at in Table 1. We see that CR streaming dissipation is comparable to the observed X-ray luminosity (after applying ) for halos close to , but not at higher masses, a pattern similar to that seen in our comparison of CR energy density to CGM binding energy.
Figure 10. Cosmic-ray streaming power delivered to the halo (black) compared with the radiative output of the CGM derived from eRosita stacks (Zhang et al. 2024b) corrected by dividing by the bolometric factor (blue solid line, with the band shaded and dashed lines), both at as a function of present-day halo mass calculated for FreeEscape, , and . The cooling curve is drawn only above , the lowest halo mass probed by observations.
That both and fall above $L_{\star} — the energy ratio from a local maximum just below it, the power comparison crossing unity at it — is not a coincidence. Instead, this behaviour is a result of the same fundamental budget considerations that make stellar feedback increasingly ineffective above . The CR energy released per unit mass of stars formed, , is to be compared with the specific binding energy of the halo, , which is at ; the ratio is . Folding in the efficiency with which halo baryons are converted into stars, at this mass, gives a CR energy per unit halo gas mass of — of order unity. Feedback regulates where the energy returned per unit mass is comparable to the binding energy per unit mass, and cosmic rays carry a fixed fraction of the supernova energy, so the CR budget inherits that. Beyond , however, halo binding energy rises as roughly (Appendix § 9) while X-ray luminosity continues to rise as roughly (cf. Figure 10), and in this halo mass range star formation efficiency is either flat or falling, so the available CR energy budget becomes increasingly small in comparison.
CR transport coefficients in the CGM
A final implication of our results is that – again excluding the outlier FreeEscape[High] region – the various observational constraints available pin to a relatively narrow range from . In dimensional rather than dimensionless terms, for a Milky Way-mass halo at , this corresponds to a diffusion coefficient at . It is therefore interesting to compare this range to published observational estimates of CR transport rates in the CGM.
This value is consistent with the cluster lower limits of Wiener & Zweibel (2019) and Habegger et al. (2026) and brackets the group-scale value of Yamasaki et al. (2024) for the hosts of odd radio circles interpreted as virial shocks, provided that we correctly include the scaling with characteristic halo mass, which differs for each of these observations. Comparison with the results of Butsky et al. (2023) is more challenging because for simplicity we assume a single throughout a halo, while they attempt to estimate the radial variation of the diffusion coefficient. Their lower limits on the effective transport rate around star-forming COS-Halos galaxies rise with radius over –, so our physical diffusion coefficient sits within their inner-CGM limits and a factor below their outer-CGM floor.
The comparison to Butsky et al. (2023) also points to a limitation of our model, which is that the radial dependence of the diffusion coefficient is essentially unconstrained in our model, due to a near-exact degeneracy. An outwardly rising would, with a flatter density profile, yield nearly the same inner-CGM CR density and -ray output as a steeper gas profile at constant , so the range of slopes where our allowed models sit (– for the IGRB cases) should be read as an effective parameter absorbing that degeneracy rather than as a direct measurement of the CGM density slope.
We defer further discussion of the implications of our findings for for the nature of CR transport in the CGM, and the physical origins of the transport rate, to Paper III.
Are high K models plausible?
We have seen throughout our discussion of implications that the FreeEscape[High] region of parameter space, in which CRs rapidly escape into the IGM and thus are dynamically and energetically irrelevant to the CGM, leads to conclusions that differ markedly from the other allowed regions of parameter space. It is therefore worth investigating this region further.
One potential concern regarding this region of parameter space is that adopting it requires at least a minor conspiracy to reproduce the observed IGRB. In this scenario, the per cent of the IGRB that the CGM supplies when falls into the lower allowed regions would have to come from elsewhere, and whatever supplies it must combine with a pionic spectrum, , to reproduce the observed single-power-law shape, over 1–10 GeV (Appendix B, Figure B1). Since the disc component already carries that shape, so must the remainder; this constraint immediately disfavors some plausible IGRB contributors, including millisecond pulsars and dark-matter annihilation. Sources that are spectrally similar to star-forming galaxies in the 1–10 GeV band such as faint blazars and misaligned AGN (e.g., Ajello et al. 2015) could in principle supply the remainder, but since they draw on an unrelated power source – accretion onto supermassive black holes – for them to make up the balance left after the star-forming disc contribution would require the two to agree to within a factor of a few. That is possible, but seems a somewhat uncomfortable coincidence (albeit one that galaxy–black hole co-evolution might partly explain). The circumgalactic emission of the same star-forming population, by contrast, carries an almost identical and slightly harder spectrum, , and supplies the remainder with no coincidences required.
Figure B1. Calibration of the effective disc calorimetry. Points: the Fermi model-A IGRB (Ackermann et al. 2015). Green: the CONGRuENTS hadronic () disc light cone (Roth et al. 2021); grey dashed, their total, which includes the leptonic components we do not model. Black: their prediction rescaled to our inputs — our cosmic-ray yield per unit stellar mass formed, the initial-mass-function normalisation of the cosmic star-formation correction (Chen & Totani 2025), and our star-formation history. Orange: our effective, spectrally tilted treatment with at the adopted , the shaded band showing the calibration range 0.68–0.86; dotted grey, the same at . The vertical shaded band marks the 1–10 GeV window in which and are fitted; there the residual is 0.005 dex rms, or 1.2%.
One could in principle avoid this problem by positing that star formation supplies only a minor share of the IGRB, but this option is harder still to sustain. Discs could radiate less only if their calorimetry were well below what the CONGRuENTS treatment gives (i.e., lower ), or if the overall luminosity per unit star formation were lower (lower ) – and both these options run into obvious problems. The CONGRuENTS value of reproduces the broadband non-thermal spectra of local star-forming galaxies at the factor-of-two level (Roth et al. 2021, 2023) and it is hard to see how to significantly reduce without breaking this. Moreover, lower would add to , pushing halos towards the non-hydrostatic regime. Lowering runs into a similar problem: applied to the Galaxy’s measured star-formation rate of (Licquia & Newman 2015), our fiducial implies predicts a luminosity in CR protons, already at the low end of the – inferred from local CR data by Strong et al. (2010).
We are therefore left with the conclusion that the high- region of parameter space is not directly ruled out, but that it requires the existence of a second class of source that contributes to the IGRB that is, coincidentally, very similar in both total luminosity and spectral shape to the emission from the discs of star-forming galaxies.
Summary, conclusions, and prospects
In this paper we construct a simple, phenomenological model for the transport of CRs through the CGM. We then ask under what circumstances this model is consistent with observational constraints arising on -ray and X-ray emission from the CGM, and with the requirement that the CR pressure in the CGM not be so large as to render it dynamically unstable. Our primary conclusions are as follows:
All the observational constraints are satisfied in a region of parameter space where CR transport rates in the CGM are moderate. Quantitatively, for a diffusion coefficient parametrised as , all the constraints are satisfied for . In this region, the diffusion time across an halo is of order a Hubble time, so CRs accumulate over galaxies’ star formation histories and
are dynamically significant, though not so dominant as to render hydrostatic balance in the CGM impossible.
For this transport rate, hadronic emission from star-forming galaxies fully explains the observed isotropic -ray background (IGRB), as long as the CGM gas density distribution obeys with –. In this regime roughly 60% of the IGRB is produced by extragalactic discs, –16% from extragalactic CGMs, and –28% from the Milky Way’s own CGM.
In this same region of parameter space, with no tuning of parameters, heating of CGM gas by CR streaming losses also naturally explain the observed X-ray luminosities of galaxy halos.
The only other scenario that is consistent with all the observational constraints is one where CRs transit through the CGM rapidly, , and escape freely into the IGM, with CR pressure itself plausibly preventing the formation of a confining virial shock. In this scenario, CR pressure and heating in the CGM are both negligible, and explaining the IGRB then requires positing the existence of a second source of rays whose spectrum and luminosity closely match those of star-forming discs to supply the remaining % of the IGRB. While not a definitive argument, we argue that this favours the first scenario on the grounds of simplicity.
Taken together, our numerical experiments show that, even though CRs in the CGM are at present extremely difficult to detect, current observations do set meaningful constraints on their properties. These constraints favour a scenario where the CR diffusion time through the halos of galaxies is of order the Hubble time, and as a result CRs accumulate in the CGM, contributing meaningfully to its dynamics, heating, and -ray emission.
While this result is suggestive, significant territory remains to be explored. In our simple model we have not yet considered the effects of varying either the efficiency with which star formation accelerates CRs or the magnetisation of the CGM. Nor have we fully explored all the available observational avenues for constraining the fate of CRs in the CGM, or the implications of our empirical constraints for the physical nature of CR transport. Pulling out these threads will be the work of the next two papers in this series: Paper II will draw out the observational consequences of our model including halo-mass-resolved -ray stacking, radio and X-ray signatures, while Paper III will ask whether self-confinement and damping can physically produce and how that depends on CGM magnetisation.
Acknowledgements
RMC thanks Felix Aharonian, Lucia Armillotta, Yuval Birnboim, Yakov Faerman, Volker Heesen, Cassi Lochhaas, Jens Niemeyer, Christoph Pfrommer, Martin Pohl, Gabriele Ponti, Matt Roth, Andy Sullivan, Andrew Taylor, Siyao Xu, and Ellen Zweibel for helpful conversations about the physics of CRs and/or the CGM. RMC acknowledges further useful conversations with participants in the Aspen Center for Physics meeting ‘Cosmic Ray Feedback in Galaxies and Galaxy Clusters’. The Aspen Center is supported by National Science Foundation grant PHY-2210452. RMC also thanks Chris Stevens and Arash Tavassoli for MATHEMATICA coding advice and assistance, and Kate Latimer & Lyndall Kennedy and Dav Taylor & Michelle Styles for hospitality and a quiet place to work. The authors acknowledge the use of CLAUDE Code in preparing this text and some of the MATHEMATICA visualisation and data processing code; the core PDE algorithm was developed by the authors. The authors thank Phil Hopkins for provision of data and Matt Roth for providing CONGRUENTS outputs and for early input to this project. The authors acknowledge support from the Australian Research Council through award DP260100433.
Data availability
The cosmic-ray transport solutions, the post-processed model grids, and the MATHEMATICA code used to generate the figures and derived quantities in this article will be shared on reasonable request to the authors. The observational data underlying the comparisons – the Fermi-LAT -ray measurements, the eROSITA X-ray surface-brightness profiles, and the IGRB and outer-Galaxy ring-emissivity compilations – are all publicly available from the cited references.
Halo density structure, virial temperature, and binding energy
We assume that dark matter in halos is distributed following an NFW profile (Navarro et al. 1997) with scale radius , and write , so that . Our virial radius encloses a mean density , so is not the concentration (with enclosing ) given by the relation of Ludlow et al. (2016), their section 4.3 and appendix C). The two are related by
with as in equation (46). The relation of Ludlow et al. (2016) must be evaluated at (iterated to convergence). For an halo at this gives and (, ); the two coincide as .
The fraction of the total halo mass at radii is
The mass (required for the X-ray analysis in § 2.2) is that within the radius inside which the mean density is , whereas our halo mass is that within , inside which the mean density is . In terms of with mean enclosed density is , so with the root of ( at ), and . For an halo at () this gives and .
The virial temperature (§ 3.5.1) is set by the gravitational self-energy of the halo truncated at , which is dominated by the dark matter, and given by (Mo et al. 1998) , with
and
for . , and hence and , are evaluated with from the relation above (for for an halo at ), and the same sets the NFW gravity in and .
The dark matter binding energy is distinct from, and much larger than, the binding energy of the CGM gas in the halo potential, , which we write as , where is a dimensionless function. To compute , we first note that for an NFW halo truncated at , the dimensionless gravitational potential at dimensionless radius is
where is defined above (equation (46)) and the gravitational potential energy of the CGM within is , where is given by equation (11).
The choice of the outer radius to which we integrate to evaluate depends on the choice of boundary condition (c.f. § 3.3). For TrappingMax the full CGM mass is located between and 1, and thus the outer boundary is at . For TrappingMin part of the CGM mass resides outside the virial shock, but we choose to count towards our binding energy only the material inside the virial shock, since the CRs are assumed to be confined within and thus to make a fair comparison we only wish to include the binding energy of the material cospatial with them. Thus we again choose as the outer boundary. Finally, for the FreeEscape case the CGM and CR distributions both continue out to the closure radius , so we take this as our outer boundary.
With these choices, we now define the dimensionless CGM gas density profile by , and we can write down our expressions for the CGM binding energy, and thus for the dimensionless function . For TrappingMin and TrappingMax we have
where is the fraction of CGM material interior to (= 1 for TrappingMax, and determined by the numerical solution for for TrappingMin – c.f. § 3.3); for the FreeEscape case we have instead
These dimensionless functions are straightforward to evaluate numerically; for the trapping modes, equals the function evaluated at .
Calibration of the effective energy-integrated calorimetry fraction
Our galaxy-by-galaxy calorimetry is the kernel density estimate built directly from CONGRuENTS’s own records (cf. § 3.4.1). That estimate carries no energy dependence, and so cannot reproduce the spectrum of the summed disc emission along the light cone. The parameters and repair precisely this: sets the spectral weighting with which we collapse to a single number, and its normalisation. No equivalent tweak is needed for the CGM, whose emission emerges with essentially the spectrum at injection.
To fix and , we first generate 4D data sets as in § 3.4.1, but over a fine grid of spectral slopes (and in grid is needed, since it is a constant multiplicative factor), and apply the same Mathematica kernel density estimation to each. This yields for any halo of mass at redshift and any .
We use this prediction to calculate the contribution to the IGRB from galactic discs. We assume that a halo of mass at redshift hosts a disc with total -ray luminosity , with and evaluated from and , and specific luminosity , where is a spectral shape function with . We compute for a proton population with momentum powerlaw index , where we adopt as the spectrum of protons at acceleration, using the inclusive differential cross-section parameterisation of Kamae et al. (2006) at low proton energies and Kelner et al. (2006) (with their inelastic cross-section) at high energies.
The total disc contribution to the IGRB flux seen from Earth is
where is the photon energy observed at Earth and the remaining symbols are as in equation (34); the kernel here is , rather than , because is a spectral flux density. All quantities that depend on halo mass are evaluated for halos mass . Integrating over the 1–10 GeV band, turns into the of equation (34).
We then calibrate our choice of and by optimising them so that the value of computed from equation (50) reproduces as closely as possible the hadronic disc emission computed directly from Roth et al. (2021), rescaled to match the slightly differing assumptions we make here compared to Roth et al. (2021). These differences are as follows. First, Roth et al. (2021) adopt supernovae per of stars formed, equivalent to erg per , compared to our erg per (equation (14)); since 98% of the injected energy lies above the pion production threshold, we compensate for this by reducing the Roth et al. (2021) prediction by a factor 1.17. Second, as pointed out by Chen & Totani (2025), there is a mismatch between the Salpeter (1955) IMF assumed by Madau & Dickinson (2014) in their calculation of the star formation history of the Universe and the Chabrier (2005) IMF used to infer star formation rates in the CANDELS sample and assumed here; we correct for this by multiplying the Roth et al. result by a factor of 0.63. Third, the star-formation history implied by our adopted model in § 3.1 is smaller than the Madau & Dickinson (2014) one (corrected to a Chabrier IMF) by a factor of 0.90 (Figure 2). Combining these three factors, our calibration target is the Roth et al. (2021) prediction multiplied by 0.48. Note that the galaxy-by-galaxy calorimetry is not rescaled: our model galaxies are less calorimetric than CANDELS galaxies at the same epoch, and that difference is a prediction of our halo model, already present in equation (50).
With this rescaling in place, we then choose and as the values that minimise the residual
where is our calibration expression given by equation (50) evaluated at photon energy and for a particular choice of and , is the CONGRuENTS prediction at the same photon energy, rescaled as above, and the sum is evaluated over the CONGRuENTS output energy grid from 1 - 10 GeV. We restrict the fit to this range because below 1 GeV our treatment of the kinematic cutoff is simpler than the one implemented in CONGRuENTS, and above 10 GeV opacity becomes significant and we do not model it; within the window that opacity is below 2%.
The residual is minimised at (where the uncertainty is the range over which the fit residual doubles) and , where equation (50) reproduces the target to 0.005 dex rms, or 1.2%, over the energy range 1 – 10 GeV. We adopt and .5 We plot the comparison, overlaid with the observed IGRB, in Figure B1. The resulting calibrated as a function of present-day halo mass and redshift is plotted in Figure B2.

Figure B2. Calibrated effective CR proton calorimetry fraction for and as a function of present-day halo mass and redshift.
References
- [29]GRAVITY Collaboration et al., 2019, A&A, 625, L10
- [37]Ji S., et al., 2020, MNRAS, 496, 4221
- [65]Planck Collaboration et al., 2020, A&A, 641, A6
- [99]van Dokkum P. G., et al., 2013, ApJ, 771, L35
- [100]van der Wel A., et al., 2012, ApJS, 203, 24



