Constraining the Jet Composition of GRB 221009A with the Prompt TeV Emission Limit

Recent LHAASO observations of the prompt emission phase of the brightest-of-all-time GRB 221009A imposes a stringent limit on the flux ratio between the TeV and MeV emissions, F TeV/F MeV ≤ 2 × 10−5, during the period 220–230 s after the trigger. This period covers the peak of the main MeV burst and is just before the TeV afterglow emerges. Within the framework of internal shocks, we study the internal γγ absorption in GRB 221009A by generating a set of synthetic bursts in a simulation that reproduces the observed feature of GRB 221009A. We find that the γγ absorption does not lead to an exponential cutoff, but rather a power-law spectrum, consistent with previous works. We further find that the attenuation due to γγ absorption alone cannot explain the flux limit ratio of GRB 221009A, suggesting a low ratio between synchrotron self-Compton (SSC) and synchrotron emission outputs. This requires the magnetic field energy density to be much larger than the synchrotron photon energy density so that the SSC flux is greatly suppressed. This indicates that the jet composition of GRB 221009A is likely Poynting flux dominated.


INTRODUCTION
The traditional "fireball" model of gamma-ray bursts (GRBs) assumes that a fireball is formed due to the initial energy release in a catastrophic event (see Kumar & Zhang (2015) for a review).Then the fireball expands under its own thermal pressure and gets accelerated to a relativistic speed.Most of the thermal energy is converted to the kinetic energy of the outflow.A fraction of the kinetic energy is then dissipated in the so-called "internal shocks", where the internal collisions among the GRB ejecta produce shocks, leading to particle acceleration and producing the prompt GRB.An alternative model is that the GRB ejecta carries a dynamically important magnetic field component (Mészáros & Rees 1997;Lyutikov & Blandford 2003;Narayan & Kumar 2009;Zhang & Yan 2011), i.e., σ > 1, where σ is the ratio between the Poynting flux and matter (baryonic) flux.In this model, the GRB radiation is thought to be powered by the dissipation of the magnetic field energy in the ejecta.
The most popular emission mechanism of the prompt emission is synchrotron radiation from relativistic electrons accelerated in internal shocks or magnetic dissipation (Meszaros et al. 1994;Uhm & Zhang 2014;Zhang 2014), which radiate in the magnetic field within the shocked plasma.In the optically-thin synchrotron sce-nario for the prompt emission, the SSC emission produced by the same population of relativistic electrons is naturally expected to generate GeV to TeV gamma-rays (Guetta & Granot 2003;Gupta & Zhang 2007).The intensity of the inverse Compton component depends on the intensity of the magnetic field (Bošnjak et al. 2009), thus the SSC component can be used to diagnose the magnetic field strength and hence the composition of the GRB jet.
On the other hand, the observed flux of high-energy emission from the SSC component is also sensitive to the γγ opacity, as high-energy gamma-rays suffer from pair production absorption with low-energy photons in the prompt emission.It is usually thought that the internal absorption leads to an exponential drop in the flux at the high-energy end, and thus a moderate optical depth would largely suppress the high-energy emission flux.However, Granot et al. (2008) argued that, due to the time evolution of the γγ opacity, the spectral shape of the γγ cutoff in the time-integrated spectrum is not exponential, but rather power-law like.Aoi et al. (2010) studied the time-integrated spectrum from internal shocks with a numerical approach and found that a broken power law spectrum is formed in practical observations that integrate emissions from different internal shocks.Hascoët et al. (2012) considered a more realistic calculation of the γγ opacity, which takes into account the time, space and direction dependent photon field existing in the outflow, and find that the γγ opacity shows strong variations for a multiple-pulse GRB.Consequently, the γγ cutoff is much closer to a power-law steepening.In this case, the suppression due to γγ opacity may not be extreme, and it may be still possible to observe the SSC component, especially for bright GRBs.
The brightest-of-all-time GRB 221009A serendipitously occurred within the field of view of the Large High Altitude Air Shower Observatory (LHAASO) (LHAASO Collaboration 2023).GRB 221009A was observed by LHAASO during the main burst phase, yielding a differential flux limit of ∼ 6 × 10 −8 erg cm −2 s −1 (after the EBL correction) at ∼ 1 TeV from T 0 +220 s to T 0 +230 s, where T 0 is the trigger time (LHAASO Collaboration 2023).This period covers the rising part and the peak of the main MeV burst, and is just before the TeV afterglow emerges.This is the period when the constraint on the TeV/MeV ratio in the prompt phase is the most severe.Compared to the averaged MeV flux during the same period, the flux ratio is R ≡ F TeV /F MeV ≤ 2×10 −5 (LHAASO Collaboration 2023).This represents the strongest constraint on the ratio of TeV flux to MeV flux in GRBs during the prompt emission.Therefore, it provides a unique opportunity to study the SSC emission and constrain the magnetic field in the prompt emission phase.
In this paper, we consider the simplest internal shock scenario to study this problem.By constraining the magnetic field strength with the prompt TeV emission limit in the internal shock model, we test the validity of this model.The paper is organized as follows.In Sect.2, through the simulation of the internal shock, we generate a synthetic burst that can reproduce the observed feature of GRB 221009A.Then we study the γγ opacity in GRB 221009A in Sect.3.In Sect.4,by comparing the SSC emission after the γγ absorption with the TeV flux limit of GRB 221009A measured by LHAASO, we put constraints on the intensity of the magnetic field in the emitting region of the prompt emission.In Sect.5, we briefly discuss the implication of the TeV limit for the magnetic dissipation model.Finally, we give discussions and conclusions in Sect.6.

INTERNAL SHOCK SIMULATION OF GRB 221009A
We model the internal shock process following the approach in Kobayashi et al. (1997).We assume that the ejection by the central engine lasts for a duration ∆T and consider the energy content of the relativistic outflow is dominated by the kinetic energy.The ejecta shells are then described by a distribution of the Lorentz factor Γ, width l, and mass m.Both quantities can vary on a timescale ∆t c (variability time of the central engine).We model the dynamic of these internal shocks via a multiple-shell model where the successive collisions between shells mimic the propagation of shock waves within the relativistic outflow (see Appendix Sect.A.1).After modeling internal shock, we can get a series of photon fields, each of which is emitted isotropically in the comoving frame of the thin spherical shell expanding ultra-relativistically with a finite duration.

Parameters setting
The light curve of GRB 221009A shows a rising phase from about T 0 + 220 s to T 0 + 227 s (An et al. 2023;Lesage et al. 2023).To reproduce this rising light curve, we explore two scenarios: Case I: we assume that the mass of the relativistic shells increases with time continuously, with the Lorentz factors Γ following the normal distribution in the range from 100 to 1000, centered at an average value of Γ = 440 (see Case I in panel (a) and (b) of Fig. 1).This averaged Lorentz factor represents the final Lorentz factor of the merged shell after multiple internal shock collisions, consistent with the inferred Lorentz factor from the TeV afterglow observations of GRB 221009A (LHAASO Collaboration 2023).
Case II: in this scenario, we assume that the Lorentz factor of the shells increases with time regularly, ranging from 200 to 800, while the masses of each shell are the same (see Case II in panel (a) and (b) of Fig. 1).This approach results in a much smoother synthetic light curve (see Fig. 5 in the Appendix), matching better the observations of GRB 221009A (An et al. 2023;Lesage et al. 2023).
For the spectrum, we use the Band function (α = −0.75 and β = −2.2) for all pulses (An et al. 2023;Lesage et al. 2023) (we chose α = −0.75 as the observed slope.However, the discussion of the internal shock model's capacity to reproduce this slope is not addressed here).The peak energy E p of the Band function for each pulse is determined by the L γ -E p relationship: L γ /(10 toku et al. 2004;Liang et al. 2004), where L γ is the isotropic luminosity and we assume the normalization factor N 0 = 1.
We set the initial distance d = c∆t c between shells to 5l.We fix the duration ∆T of the central engine to 10 s. Liu et al. (2023) find that, during the early rising phase (T 0 + 210 s to T 0 + 219 s) of the main burst emission, at which the detector is not saturated, the minimum variability time is ∆t v = 0.082 s.Lesage et al. (2023) find that the minimum variability time is about 0.2 s during the time right before and after the main burst (see Fig. 2 in Lesage et al. (2023)).We thus consider two cases of variability time of the central engine: ∆t c = 82 ms and ∆t c = 200 ms.

Simulated light curves and spectra
We then obtain the synthetic light curve in the 20 -200 keV range through integrating over equal-arrival time surfaces (EATS), using the parameters outlined in Section 2.1.The panel (c) of Fig. 1 illustrates the collision radius R c for the N c th observed pulse.Notably, in Case II, R c consistently rises with N c because of the regular increase of Γ.The panel (d) of Fig. 1 shows the distribution of the collision radius R c .In Case I, with a collision time scale of ∆t c = 82 ms, R c centers at R c ∼ 10 15 cm with a wide tail.When ∆t c = 200 ms, the center shifts to R c ∼ 2 × 10 15 cm, in agreement with the analytical estimate R c ∼ 2Γ 2 0 c∆t c .In Case II, the narrow distribution of R c can also be attributed to the regular distribution of Γ.
The simulation reproduces some key characteristics of GRB 221009A, as shown in Fig. 1: in panel (e), we present the synthetic GRB spectrum, which roughly matches the observed spectrum (a Band function with α = −0.75 and β = −2.2).The peak energy of the Band function increases with time during the rising phase of the light curve owing to the relationship between L γ and E p used in the simulation.Panel (f) of Fig. 1 and Fig. 5 display the MeV emission light curves with different time resolutions.Both light curves exhibit a rising behavior, consistent with the observations of GRB 221009A during the period from T 0 + 220 s to T 0 + 230 s after the trigger.

γγ ABSORPTION OF TEV EMISSION
In the internal shock scenario, a series of pulses are generated from collisions.High-energy photons can undergo significant absorption due to the pair-creation process γγ → e + e − .We define two kinds of absorption according to the origin of the target photons for the annihilation: (1) internal Absorption: this refers to the scenario where a high-energy photon is absorbed by target photons originating from the same pulse as the highenergy photon.(2) external Absorption: in this case, a high-energy photon is absorbed by target photons that originate from other pulses.
An important quantity to describe the degree of absorption is the absorption ratio f γγ , which is defined as the average ratio of the absorbed flux to that without absorption: where E HE is the energy of a high-energy photon, F ν (E HE , k) is the flux density of the kth pulse, k tot is the number of pulses and τ γγ (E HE , k) is the γγ optical depth for the kth pulse (see Eq.A2 and Eq.A3).
Before dealing with more complex dynamical configurations within the internal shock framework, we first study a simple single-pulse case and two-pulse case to compare with previous studies and understand the underlying physics.

Single-pulse case
In single-pulse scenario, we assume that photons are emitted isotropically in the comoving frame of a thin spherical shell with a finite duration, which turns on radiation at R = 10 15 cm and turns off at 1.5 × 10 15 cm with isotropic luminosity L γ = 10 54 erg s −1 and Lorentz factor Γ = 440.In this case, we only need to consider internal absorption within the pulse.The absorption ratio f γγ in single-pulse case is calculated by Eq.A2, which is power-law like (see the black solid line in Fig. 2) instead of exponential.This is in agreement with the result in Granot et al. (2008), which argues that highenergy photons can escape before the building-up of the target photon field and the time-integrated spectrum is power-law like.

Two-pulse case
For the two-pulse case, we consider two photon fields: the back (inner) photon field absorbed by the front (outer) photon field.Since we only can receive the photons emitted along the line of sight, and the back photons can never catch the front photons emitted on the line of sight, we do not need to consider the absorption of the back photons field to the front photons field.The external absorption of the back photon field can be calculated by Eq.A3.We fix the Lorentz factor Γ f = 440, the total energy E f = 10 53 erg of the front photon field, and the emission radius R b = 10 15 cm of the back photon field.The distance d bf between two photon fields is fixed to 3 × 10 9 cm.Then we vary the emission radius R f of the front photon field and calculate the γγ absorption.The γγ opacity is shown in Fig. 2 and we find the following results for the external absorption: (1) While the spectrum of an individual pulse exhibits a power-law distribution, external absorption by other pulses causes the spectrum to become exponential, except for the first received pulse, which remains unaffected by external absorption.This occurs because the front photon field has been established, making the absorption of the subsequent pulse significant.
(2) The strongest absorption of TeV photons in the background photon field occurs when R f is approximately equal to R b , as depicted in Fig. 2.This happens because: (i) when R f < R b , the absorption region extends beyond R b .In such cases, a small R f leads to significant anisotropy in the absorption region, resulting in a low γγ opacity.(ii) conversely, if R f > R b , the absorption region surpasses R f .In this situation, a large R f results in a lower energy density within the absorption region, leading to reduced γγ opacity.

The γγ absorption in internal shocks
In this section, the model is applied to the dynamic evolution anticipated within the internal shock framework, where the entire prompt gamma-ray emission is considered as a collection of multiple sub-pulses (refer to Sect.2.2).
Case I: in the left panel of Fig. 3, we present the spectra of the first five observed pulses from the simulation (as discussed in Sect.2.1) with a collision time scale of ∆t c = 82 ms.The initial pulse (pulse1 in Fig. 3) exhibits a power-law-like spectrum as it does not experience external absorption.However, all subsequent pulses display an exponential cutoff due to external absorption.This result agrees with the results in Sect.3.1 and Sect.3.2.The time-integrated spectrum of all pulses becomes notably flatter and resembles a power-law due to the superposition of the spectra with different cutoff energies (E cut ) where τ γγ (E cut ) = 1.E cut primarily depends on two factors: the energy density of the local photon field and the degree of anisotropy of the photon field.At larger radii, where the photon energy density is low and the photon field anisotropy is high, the γγ opacity decreases (as seen in Fig. 4), resulting in a larger E cut .The result that the superposition of spectra with different cutoff energies leads to a power-law spectrum is consistent with the finding in Aoi et al. (2010), although no external absorption is considered in Aoi et al. (2010).
Case II: we also present five pulses from the simulation for this case in the left panel of Fig. 3. Similar to Case I, the first observed pulse exhibits a power-law-like spectrum because it does not suffer external absorption.However, in Case II, the cutoff energies across different pulses are similar, in contrast to Case I.This similarity arises from the regular distribution of the Lorentz factors (Γ), which results in a tight distribution of collision radii R c (as seen in panels (c) and (d) in Fig. 1).Most of the pulses occur in regions with similar photon energy density and photon field anisotropy due to the tight distribution of R c , leading to similar cutoff energies.The superposition of multi-pulse spectra still forms a powerlaw spectrum because of two factors: (1) the large collision radii lead to a large cutoff energy which is close to the observation window; (2) photons from the first pulse can escape before the photon field fully develops.However, in this case, the power law is steeper than that in Case I, with f γγ ∝ E −2.5 (see the right panel of Fig. 3).
We display the absorption ratio f γγ as a function of photon energy in the right panel of Fig. 3.In Case I, a smaller time variability leads to a larger absorption.This is because a smaller variability time results in smaller collision radii and a more intense photon energy density.Conversely, in Case II, the variability time does not significantly impact the absorption ratio.This is because different variability time primarily affects the number of injected shells while the collision radii remain the same (see panel (d) of Fig. 1).This leads to similar photon energy densities and, consequently, similar levels of absorption.

CONSTRAINTS ON THE JET COMPOSITION IN THE INTERNAL SHOCK SCENARIO
The obtained absorption ratio f γγ is insufficient to explain the flux ratio F TeV /F MeV ≤ 2 × 10 −5 if the SSC emission component (i.e., TeV emission) has a comparable flux to that of the synchrotron component (i.e., MeV emission).This suggests a low ratio between the SSC and synchrotron outputs.Below we discuss its implication for the magnetic field intensity in the emitting region.We assume that in GRB internal shocks, fractions of ϵ B and ϵ e of the shock internal energy are converted into the energy in the magnetic field and electrons, respectively.It is usually assumed that the electrons are rapidly cooling, so the energy density in gamma-ray emission U γ is equal to the electron energy density U e .The magnetic field is given by: where R in is the radius of the internal shock dissipation, L γ is the luminosity in gamma-ray emission and Γ 0 is the bulk Lorentz factor.In the synchrotron model for the prompt MeV emission, by use of hν m = ϕ ν 3hqB 4πmec γ 2 m Γ, one can derive the Lorentz factor of electrons that radiate at the GRB peak energy hν m (Wang et al. 2009), (3) where ϕ ν ≃ 0.5 is the coefficient defined in Wijers & Galama (1999) and q is the electron charge.
The peak energy of the prompt emission during the initial phase of GRB 221009A is ∼ 1 MeV (Frederiks et al. 2022), so we take hν m ∼ 1 MeV.The KN limit introduces a new critical Lorentz factor γm , defined as γm ≡ Γm e c 2 /hν m , corresponding to the critical electrons that up-scattering photons at energy hν m in the Thompson scattering regime (Nakar et al. 2009).We obtain γm = 220(Γ 0 /440)(hν m /1 MeV) −1 .Unless ϵ e ≤ 10 −4 ϵ B , which is unreasonable in terms of the burst energetics, we have γ m > γm , so the IC scattering between γ m -electrons and the bulk of the gamma-ray emission should be in the Klein-Nishina (KN) regime.In the KN regime, the SSC spectrum is given by (Nakar et al. 2009): The SSC emission flux peaks at (5) where we have used Eq.3.Thus the SSC spectral peak is expected to be located within or close to the observed energy range of LHAASO.Defining f spec as a suppression factor due to SSC peak deviation from the LHAASO energy range, we expect f spec ≥ 0.3 in a conservative way.
In the case of γ m > γm , the SSC to synchrotron energy output is well approximated by (Nakar et al. 2009): where the suppression due to the KN effect is for typical parameter values.
During T 0 + 220 s to T 0 + 230 s, the flux ratio between TeV flux and the MeV flux is R ≡ F TeV /F MeV ≤ 2×10 −5 .Considering the γγ absorption, the SSC to synchrotron luminosity ratio should be Y ≤ R/(f spec f γγ ).From Eq.6, we obtain roughly for typical value of p = 2.2 -2.5.This means that the magnetic field energy density is much larger than the electron energy density, so the SSC flux can be greatly suppressed.This is inconsistent with the usual assumption that energy equipartition between the ion, electron, and magnetic energy is obtained at the internal shocks (Murphy et al. 2010).ϵ B ≫ ϵ e implies a small ϵ e for GRB 221009A, which leads to a small radiation efficiency for internal shock emission.Therefore, the prompt TeV limit imposed by LHAASO observations seems to challenge the standard internal shock model for GRB 221009A.

THE MAGNETIC FIELD DISSIPATION MODEL
In the above, we have a matter-dominated composition, where the internal shock scenario applies.ϵ B ≫ ϵ e points to a magnetic-field dominated composition of the jet.If the GRB ejecta carries a dynamically important magnetic field component, i.e., σ > 1, the GRB radiation is thought to be powered by the dissipation of the magnetic field energy in the ejecta (Mészáros & Rees 1997;Lyutikov & Blandford 2003;Narayan & Kumar 2009).
In the Internal-Collision-Induced Magnetic Reconnection and Turbulence (ICMART) model (Zhang & Yan 2011), magnetically-dominated winds are injected from the central engine intermittently.At first, the field lines are ordered and have the same orientation, so the reconnection is suppressed.However, the collisions trigger an "avalanche" of magnetic reconnection/turbulence events, causing efficient radiation.So the ICMART model needs multiple collisions to dissipate magnetic energy and cause radiation, which tends to occur at larger radii.In the ICMART scenario, we consider a single main pulse emitted with an observed duration of about 5 s).We assume that the pulse turns on radiation at ∼ R ICMART = 10 16 cm or 10 17 cm, respectively, and other parameters are the same as those in the back pulse of Fig. 2. In this case, we find the TeV absorption ratio decreases significantly, with a value of f γγ = 0.34 and 0.82 for R ICMART = 10 16 and 10 17 cm, respectively, at 1 TeV.
The suppression ratio due to the KN effect is f KN ∝ R −1/4 according to Eq.3 and f KN ∝ γ −1/2 m .We obtain f KN ≃ 0.06 and 0.03 for R ICMART = 10 16 cm and 10 17 cm, respectively.In the ICMART scenario, the gamma-ray luminosity is L γ = L w ηϵ e , where L w is the total isotropic luminosity of the wind and η is the energy dissipation efficiency (Zhang & Yan 2011).Then the energy density of photons in the comoving-frame of the jet is U ′ ph = Lγ 4πR 2 Γ 2 c and the energy density of the magnetic field is Then we have: Using R ≡ F TeV /F MeV ≤ 2 × 10 −5 and assuming ϵ e = 0.1, we get η ≤ 0.033 for R ICMART = 10 16 cm and η ≤ 0.027 for R ICMART = 10 17 cm when σ ≫ 1.Note that the above estimate of the efficiency η applies only to T 0 + 220 -T 0 + 230 s, during which about 1/3 of the whole prompt radiation energy is radiated according to prompt emission observations (An et al. 2023;Lesage et al. 2023).The efficiency at a later time could be higher as σ decreases.In addition, the above calculation has assumed that the property of the emitting region of ICMART is the same as that in the internal shock, which is not the case.In the ICMART model, the observed flux is the superposition of the many mini-jets with different orientations.Each reconnection event is a fundamental mini-jet in the ICMART model, and the direction of the mini-jets can be isotropic (Zhang & Zhang 2014;Shao & Gao 2022).This would lead to a larger interaction angle for high-energy photons and a stronger γγ absorption.Therefore the absorption factor f γγ could be lower than the above estimate and the inferred radiation efficiency will increase correspondingly.Detailed calculation of the absorption ratio including mini-jet structure is beyond the scope of this work.

CONCLUSIONS AND DISCUSSIONS
LHAASO Collaboration (2023) estimated the γγ optical depth in the prompt emission of GRB 221009A to be τ γγ ∼ 190 assuming an isotropic radiation field in the single-zone model.In this work, we find that although the optical depth is large, it does not lead to exponential attenuation of TeV photons in the framework of the internal shock scenario.We find that the superposition of spectra of different pulses with different cut-off energy results in a power-law-like spectrum for the timeintegrated emission (see Fig. 3).The absorption ratio is only about ∼ 10 −1.5 -10 −2.5 for TeV photons, assum-ing a bulk Lorentz factor of 440 and the variability time in the range of 82 -200 ms.This absorption ratio cannot explain the low TeV flux limit of GRB 221009A imposed by the LHAASO observations and requires a low ratio between the SSC and synchrotron emission outputs.Then we find that ϵ B /ϵ e ≳ 10 -100 for GRB 221009A.
The inference ϵ B ≫ ϵ e is inconsistent with the usual assumption that energy equipartition between the ion, electron, and magnetic energy is obtained in internal shocks (Murphy et al. 2010).ϵ B ≫ ϵ e also leads to a small radiation efficiency for internal shock emission.On the other hand, ϵ B ≫ ϵ e seems to point to a Poyntingflux dominated outflow in which the radiation is powered by the magnetic dissipation.We discussed the possibility of interpreting the prompt emission of GRB 221009A with the ICMART model.The γγ absorption could be larger due to the configuration of mini-jets, although a detailed calculation is needed to verify this.If this is the case, then a mild magnetization with σ ∼ a few would be sufficient to explain the TeV limit and also lead to a high radiation efficiency.We model the internal shock process following the approach in Kobayashi et al. (1997).At t = 0, all the shells are at initial positions R i and characterized by the following parameters: width l i , mass m i , and the Lorentz factor Γ i .So the distance d i between shell i and shell i + 1 is R i − R i+1 − l i+1 .The internal collisions keep occurring until all the shells merge into one shell or the velocities of all inner shells are slower than that of outer shells.We note that the relative value of the mass of shells determines the dynamic evolution rather than the absolute value.The absolute value of the mass of shells only determines the total energy of radiation.For the jth collision, we can calculate and record the following physical quantities in the source frame: collision radius r j , collision time t j , duration time δt j of emission and energy E j of emission and Lorentz factor of the merged shell Γ m,j .By recording these quantities, we can calculate both internal and external absorption.

A.2. Internal absorption
As mentioned above, photons are emitted isotropically in the comoving frame with finite duration by a thin spherical shell.We use numerical method to calculate γγ opacity as in Hascoët et al. (2012): Here subscript j indicates the quantities of the jth collision.We divide the duration of the jth emission into a series of time grids so that in every grid the emission can be approximated as a "flash" instead of continuous radiation.t jk , R jk , Γ jk , ϵ rad,jk and E ′ p,jk (k = 1, • • • , k max ) are the emission time, emission radius, Lorentz factor, total radiation energy and spectra peak energy of the kth flash in the jth emission.The emission turns on at t j1 = t j and turns off at t jkmax = t j + δt j , where t j and δt j is the collision time and duration of emission of jth collision.We assume Γ jk , E ϵ rad,jk ′ /δt j ) are constant during the shell spreading in single collision event.All quantities in Eq.A1 are in source frame besides E ′ p,jk , which is in comoving frame, and normalized spectra B are the same in source frame and comoving frame.
The internal γγ opacity of the jth pulse can be written as: All the quantities requiring astrophysical input are R j , δt j , L m,j , Γ m,j and photon index of spectra to calculate τ γγ,in .R j , δt j , L m,j and Γ m,j can be calculated from internal shock modeling.The Photon index should be determined by observation and we assume the photon index of the spectrum is the same for all collisions.

A.3. External absorption
In order to calculate γγ opacity between different shells and reduce computing time, we make an approximation that every emission of collision is a flash.If the shell's distance d i is larger than the shell's width l i , then the pulse width δt j is determined by angular spreading time instead of hydrodynamic time (Kobayashi et al. 1997).So flash approximation is effective since we assume d i > l i in the internal shock modeling.By using this approximation, we can calculate the external γγ opacity of the jth pulse: All the pulses outside of the jth pulse should be included in Eq.A3 since only photons from outside of the jth pulse can catch the photons from the jth pulse in the external scenario as that mentioned in Sect.3.2.The quantities requiring astrophysical input in Eq.A3 are collision radius R j , collision time t j , Lorentz factor of merged shell Γ m,j , energy of emission ϵ rad,j and spectrum B j , all have been calculated in the internal shock modeling besides B j , which has been determined by observation as mentioned above.

Figure 1 .
Figure 1.Modeling GRB 221009A in the internal shock scenario through numerical simulation.We use four colors to represent different cases and variability timescales: blue (Case I, ∆tc = 82 ms), gray (Case I, ∆tc = 200 ms), black (Case II, ∆tc = 82 ms) and red (Case II, ∆tc = 200 ms).(a) Initial distribution of mass m for the injected shells, with Tinj representing the time elapsed after the first shell is injected in the source frame.(b) The initial distribution of Lorentz factors Γ for the injected shells.(c) The collision radius Rc for the Ncth observed pulse.(d) The distribution of collision radii Rc, where P is the probability density.(e) The time-average spectra in the observer frame during three time intervals: T0 + 220 -T0 + 223 s (the dashed-dot line), T0 + 223 -T0 + 226 s (the dashed line), and T0 + 226 -T0 + 230 s (the solid line).(f) The synthetic light curve in the 20 -200 keV range, integrated on equal-arrival time surfaces (EATS) with a time bin of 1 s in the observer frame.The magenta light curve represents the observed one (An et al. 2023).Light curves with smaller time bins are provided in Fig.5 in the Appendix.Here, T obs represents the time elapsed after T0 + 220 s in the observer frame.

Figure 2 .
Figure 2. Absorption ratio fγγ in single-pulse (the solid line) case and two-pulse case (the dashed lines).

Figure 4 .
Figure3.Left Panel: The spectra of five pulses in the simulation for both Case I and Case II (refer to Sect.2.1), using ∆tc = 82 ms.In Case I, we choose the first five observed pulses; In Case II, we choose 5 pulses with intervals of 17 pulses to see the evolution of cut-off energies from different pulses.Right Panel: The time-integrated absorption ratio fγγ for the simulated GRB, which reproduces the key characteristics of GRB 221009A.