The contemporaneous phase of GRB Afterglows — Application to GRB 221009A

The TeV observations of GRB 221009A provided us with a unique opportunity to analyze the contemporaneous phase in which both prompt and afterglow emissions are seen simultaneously. To describe this initial phase of Gamma-Ray Burst afterglows, we suggest a model for a blast wave with intermittent energy supply. We treat the blast wave as a two-element structure. The central engine supplies energy to the inner part (shocked ejecta material) via the reverse shock. As the shocked ejecta material expands, its internal energy is transferred to the shocked external matter. We take into account the inertia of the shocked external material so that the pressure difference across this region determines the derivative of the blast wave’s Lorentz factor. Applied to GRB 221009A, the model yields a very good fit to the observations of the entire TeV lightcurve except for three regions where there are excesses in the data with respect to the model. Those are well correlated with the three largest episodes of the prompt activity and thus, we interpret them as the reverse shock emission. Our best-fit solution for GRB 221009A is an extremely narrow jet with an opening angle θ j ≈ 0 . 07 ◦ (500 / Γ 0 ) propagating into a wind-like external medium. This extremely narrow angle is consistent with the huge isotropic equivalent energy of this burst and its inverse jet break explains the very rapid rise of the afterglow. Interestingly, photon-photon annihilation doesn’t play a decisive role in the best-fit model.


INTRODUCTION
Gamma Ray Bursts (GRBs), see e.g.(GRBs, see e.g.Piran 2004, for a review) are observed across the entire electromagnetic spectrum -from radio frequencies to TeV energies.Nevertheless, many important aspects of their physics remain poorly understood and every out-of-the-ordinary observation offers new insights.
GRB emission is divided into two phases: prompt and afterglow.The prompt emission is often rapidly variable with a complex lightcurve, whose structure is attributed to the activity of the central engine.It is followed by a gradually declining afterglow emission with a smooth lightcurve, which is attributed to a relativistic blast wave that forms when the material ejected by the central engine during the prompt phase interacts with the circumburst medium.It is natural to expect that the early afterglow (i.e., the emission from the external shock) overlaps in time with the prompt emission (see e.g.Zou & Piran 2010).However, this overlapping initial stage of afterglows is hidden from view: afterglows' X-ray signal is indiscernible against a much stronger prompt X-ray signal.
High-energy gamma-ray emission from GRBs was predicted before actual detections.From efficiency arguments, it was anticipated that GRBs have synchrotron-self-Compton (SSC) component in the TeV range and that it carries about 10 percent of the emitted energy (Derishev et al. 2000(Derishev et al. , 2001)).
Early attempts to estimate the parameters of the high-energy SSC component from the first principles placed it in the GeV band (Sari & Esin 2001).Numerous other efforts to estimate this emission (Zhang & Mészáros 2001b;Razzaque et al. 2004;Pe'er & Waxman 2005;Fan & Piran 2006;Fan et al. 2008;Panaitescu 2008) followed.Later the expectations were extended to the TeV band for dense stellar wind environments (Vurm & Beloborodov 2017).It was not until the appearance of the pair-balance model (Derishev & Piran 2016) that firstprinciples predictions of the strength of the SSC component became possible.The pair-balance model places the peak of the SSC component at around 1 TeV (rather insensitive to GRB parameters) and predicts that its power is always comparable to the power of the synchrotron component.
When Fermi-LAT detected early GeV emission from several GRBs, it was suggested (Kumar & Barniol Duran 2010;Ghisellini et al. 2010) that this is an afterglow and not prompt emission, even though there was some overlap of the observed GeV signal with the lower energy gamma-rays.However, there was not enough data to explore the contemporaneous prompt-afterglow phase.Recently, the TeV observatory LHAASO (LHAASO Collaboration et al. 2023) detected a strong TeV signal while numerous satellites (Frederiks et al. 2023;An et al. 2023;Lesage et al. 2023) measured a simultaneous low-energy gamma-rays from GRB 221009A.The lightcurve in low-energy gamma-rays shows the usual complex structure with several pulses and rapid variability, whereas the TeV lightcurve is smooth as expected for the signal from an expanding blast wave.It should be noted that GRB 221009A was the brightest so far, and there is a good chance that its signal-to-noise ratio in the very first unambiguous afterglow onset detection will remain unbeatable for a long time.
The unique observations of GRB 221009A have already attracted a lot of attention, and several authors attempted to explain different features of this burst (Zhang et al. 2023;O'Connor et al. 2023;Khangulyan et al. 2023;Ren et al. 2023;Sato et al. 2023).Here we focus on the fact that the observation of the initial afterglow stage, overlapping with the prompt phase, offers a unique opportunity to extract information that would be inaccessible by other means.In particular, this includes the density profile of the circumburst medium as well as some characteristics of the central engine, such as the width of the jet, the variability of its Lorentz factor, and the radiative efficiency during the prompt phase.
A model for the earliest afterglow has to take into account that the blast wave continuously acquires more energy from the central engine.So far, attention has been given to the behaviour of the reverse shock in the presence of the variable energy supply from the ejecta Nakar & Piran (2004, 2005); McMahon et al. (2006).This is natural as the reverse shock is the one that directly interacts with the ejecta.Less attention was given to the impact of variable energy supply on the forward shock.Indeed, models of blast waves with energy supply (and leakage due to radiation) have been known for a long time: the seminal Blandford & McKee (1976) paper describing a self-similar solution (hereafter the BM solution) of a constant energy blast wave also presented blast wave solutions with increasing energy.Various authors considered plain archetypal scenarios: continuous energy injection at a rate that varies as a power of time (Cohen & Piran 1999;Zhang & Mészáros 2001a;Sari & Mészáros 2000) or impulsive energy injection (Sari & Mészáros 2000;Kumar & Piran 2000).Other works simply considered a BM solution in which the energy increases as a function of time.However, these models, which assume that a self similar solution has already been established, are not suitable for the very early phase in which the reverse shock is still active and it is gradually transferring its energy to the forward shock.The case of GRB 221009A, with simultaneous measurements of both the central engine's activity and the emission from the blast wave fed by this activity, enables us to explore this stage.A suitable theory is necessary to use these observations and build a coherent physical concept of the earliest afterglow.
Our goal is to construct a minimalistic (i.e., as simple as possible) but functional (i.e., verified against observations) model for an expanding relativistic blast wave that is continuously fed with energy from the central engine at an arbitrary time-dependent rate.Observation of the earliest afterglow from GRB 221009A provides a testbed for such a model.Incorporating model elements one by one and comparing the theoretical results to the observations, we were able to justify that our model is indeed the minimal functional model.
Our model is based on the common reverse shock, forward shock and contact discontinuity structure.Namely, at the initial phase, the blast wave is composed of a shocked ejecta material and a shocked external material that are in pressure balance at the contact discontinuity between them.We include two new ingredients to this picture.First, noticing that the energy from the ejecta is supplied through the reverse shock to the shocked ejecta material which gradually pushes on the shocked external material, giving the forward shock additional energy, we consider the energy transfer between those two regions.Second, we explicitly take into account the inertia of the shocked external matter, by relating the blast wave's acceleration (or deceleration) to the pressure gradient inside.We treat both regions as single elements and therefore ignore all possible internal dynamics.Although we do not resolve the spatial structure of the forward shock region, the pressure difference across it is taken into account, being an essential constituent of the model.To reach a better quantitative agreement with observations at later times one needs to consider a narrow jet instead of a spherical outflow, or otherwise the luminosity decline is too slow.
This model provides a good fit to the measured TeV lightcurve of GRB 221009A, which likely makes it a valid choice for modeling the afterglow onset phase in other GRBs as well.In addition, the model serendipitously produced a fairly convincing case for emission coming from the reverse shock.The reverse-shock emission component turns out to be (i) much weaker than emission from the forward shock and (ii) in principle discernible in TeV lightcurves.Although the reverse shock contribution appears to be small in the TeV range, it may be stronger in other spectral bands (Sari & Piran 1999a,b;Mészáros & Rees 1999;Wang et al. 2001;Nakar & Piran 2004;Razzaque et al. 2004;Genet et al. 2007).
The paper is organized as follows.In Sect.
(3) we present the new model for relativistic blast wave with continuous and intermittent energy supply, and discuss solutions for afterglow lightcurves for several typical scenarios.In Sect.(4) we describe the method of lightcurve modeling.We then apply the model to TeV observations of GRB 221009A.We find an excellent best-fit solution and we analyze its properties.In Sect.(5) we list our most important findings also mentioning possible alternative interpretations.

GRB 221009A OBSERVATIONS
The prompt emission of GRB 221009A was so bright, that it saturated all the X-ray telescopes that attempted to detect it.However, Konus-WIND and ART-XC teams (Frederiks et al. 2023) were able to reconstruct the prompt lightcurve.combining their measurements.Figure (1), which is compiled from the Frederiks et al. (2023) data, presents the prompt lightcurve.A similar lightcurve was obtained by and GECAM-C (An et al. 2023).The three brightest pulses together contain about 99 percent of the entire energy release during the prompt phase of GRB 221009A.Their energy shares are in proportion 6:3:1.We will name these pulses P2, P3, and P4, following the notation of Frederiks et al. (2023).
TeV lightcurve of GRB 221009A was reported by LHAASO Collaboration et al. (2023) and is shown in the upper panel of Fig. (2).To make the lightcurve less noisy we combined the original data points between 10 s and 500 s into sets of three, while the other data points remain unchanged.Following LHAASO Collaboration et al. (2023), we measure time from T * ≡ T0 + 226 s, where the TeV signal appears first, with the sharp rise that is delayed by several seconds with respect to the beginning of the strongest pulse in the prompt Our assumption is that the prompt kinetic luminosity follows the count rate.lightcurve.Unlike the prompt low-energy gamma-ray emission, the TeV lightcurve is smooth and almost featureless.It has a rather sharp peak at approx.17 s and two barely distinguishable features (local excesses) in its decaying branch, one narrow feature at approx.40 s and one broad feature between approx.250 s and 600 s.
The drastic difference between the rapidly and strongly variable prompt low-energy gamma-rays and the smooth TeV lightcurve (the two do not show any apparent correlation) immediately led to the conclusion that, despite the temporal coincidence with the prompt low-energy gamma-rays, the TeV emission is due to afterglow and it arises from the blast wave expanding into the circumburst medium (LHAASO Collaboration et al. 2023).
For an afterglow, it is convenient to complement the lightcurve (i.e., temporal dependence of energy flux F (T )) with another plot for quantity E eff = 4πD 2 L F × (T − T * ), that is source luminosity multiplied by observer's time.For a self-similar blast wave, the bolometric luminosity is kin /t obs (Cohen & Piran 1999;Derishev 2023), where ϵr is radiative efficiency, E (iso) kin the shock's kinetic energy (isotropic equivalent), and the numerical coefficient C L is of the order of unity (it depends on the external density profile).Therefore, the quantity E eff has the meaning of the proxy to the blast wave energy (we will call this effective blast wave energy).It is plotted in the lower panel of Fig. (2).The effective energy reaches its very broad maximum at approx.70 s, i.e. much later than the lightcurve's maximum.Apparently, this fact reflects the history of energy injection into the blast wave.A subsequent decline in E eff may be either due to the deceleration of the structured-jet blast wave or due to radiative energy losses, or both.The former brings into view parts of the jetted structure that move at larger angles to the line of sight and have lower isotropic equivalent energy, thus reducing the average isotropic equivalent energy.The two features (excesses) in the lightcurve, described earlier, become more visible in the effective energy plot.

The model
Put in simple words, the observed lightcurve of GRB 221009A afterglow (see Fig. 2) poses two challenges for any blast wave model that attempts to describe it.First, the model has to explain the very rapid rise of the lightcurve, where the rise timescale trise is much smaller than the decay timescale t decay .Second, the lighcurve has a very simple shape, with its maximum located between two dominant episodes of prompt emission (these must be as well the main episodes of energy injection to the blast wave), showing no visible response to the second episode.With some caution, one can interpret this combination of features in the following way: the blast wave is much more responsive to energy input when it accelerates than when it decelerates.
In this section we describe the minimalistic blast wave model that can reproduce observations.Consider, first, the classical BM solution.The energy of the blast wave is: where Mej is the mass of the shocked ejecta, M fs the sweptup mass, Γ0 the Lorentz factor of ejected material at the moment of ejection, and the factor CE is a numerical factor that depends on the density profile of the external medium.
In the case of ISM (a constant density) circumburst medium C E = 6/17, and in the case of wind-like (ρ ∝ R −2 ) circumburst medium C E = 2/9.Radiative losses change the blast wave's deceleration law, thus altering the coefficient C E (Cohen et al. 1998).We restrict our analysis to power-law density profiles (ρ ∝ R −k ) that allow us to relate the swept mass and the local density (2) It is straightforward to take into account energy injection by the kinetic energy of the ejecta and radiative losses (generalizing Cohen & Piran 1999): Here ϵr is the fraction of shocked gas energy that is converted into radiation and is the difference between blast wave propagation time and free coasting time for the ejected material, calculated in ultrarelativistic approximation.Note that if Γ0 depends on tinj, then Eq. ( 4) may have more than one solution.In this case, internal shocks form within the ejected material at the coasting phase.We do not consider this possibility.
The model described by Eqs.(1-4) fails to explain the afterglow of GRB 221009A -it proves to be too responsive to energy injection and it always produces a prominent bump following the second episode of prompt activity.The reason for such behavior is the absence of inertia: whenever energy is injected into the blast wave, the latter immediately reacts, increasing its Lorentz factor.Dermer & Humi (2001), revisited by Nava et al. (2013), suggested that the rate at which the blast wave's internal energy changes with distance, rather than the energy itself, determines the variation of the Lorentz factor.In its original form, the model's limit to the Lorentz factor growth is Γ sh ∝ R 3/4 .However, these works contain a tricky flaw.The authors take the change of the entire comoving volume of the shocked gas (∝ R 3 /Γ sh ), to measure the comoving volume change of an individual fluid element.But, along the radial flow lines, the comoving volume of a fluid element scales as R 2 Γ sh (from the relativistic continuity equation).This alters the anticipated blast wave dynamics.With the correct expression, this model leads to Γ sh ∝ R, which is the common acceleration law of a hot fireball.Even this acceleration is too slow to explain the fast rise in GRB 221009A.
We adopt a different approach.Noting that in GRB 221009A the afterglow was caught in its rising phase when there is an energy supply from the central engine and the blast wave still builds up, we recall that at this stage, the system is enclosed between two shocks (Sari & Piran 1995) -a forward shock that propagates into the external medium and a reverse shock that propagates into the ejecta (illustrated in Fig. 3).A contact discontinuity separates the shocked external matter and the shocked ejecta1 .Energy is supplied to the blast wave from the jet through the reverse shock.As the reverse shock and the forward shock regions are connected via a contact discontinuity, the internal energy of the reverse shock region lost in its adiabatic expansion is transferred to the forward shock region.The forward shock region guides the evolution of the blast wave's Lorentz factor.Unlike other models, we explicitly take into account the inertia of the shocked material so that the acceleration (or deceleration) rate is given by the average pressure gradient acting on the swept mass.
We provide here a simple analytic model for this system.While this model ignores the internal dynamics within the two shocked regions, such as possible appearance of additional shocks within them, the model fits nicely, as we show here, the observations of GRB 221009A.Our approach essentially averages the hydrodynamic equation of motion (in Lagrangian formulation) over the shocked external material.A fluid element in its locally comoving frame experiences acceleration a = −c 2 ∇p/w, where p is pressure and w specific enthalpy (w = 4p for a relativistic equation of state).Then it's Lorentz factor, measured in the lab frame, changes as dΓ el / dR = a/c 2 .
Averaging over the external shocked material, we obtain a differential equation that describes the evolution of the forward shock Lorentz factor (which is √ 2 times larger than the bulk Lorentz factor of the shocked gas): Here, ∆R ′ is the width of the forward shock zone in the comoving frame.
The average enthalpy ⟨w⟩ can be expressed in terms of the energy of shocked external material E fs The pressure at the outer boundary is determined from the jump conditions at the shock, Substituting Eqs. ( 6), ( 7), and (2) into Eq.( 5) we obtain When the energy of shocked external material is equal to the energy of the self-similar BM solution, i.e.E fs = E BM ≡ C E Γ 2 sh M fs c 2 , then Eq. ( 8) must reproduce the behaviour of this self-similar solution, i.e. (R/Γ sh ) (dΓ sh /dR) = (k − 3)/2.This constrain allows us to derive pin pout The pressure ratio pin/pout for a general solution is different from Eq. ( 9).To estimate it, we note that E fs ∝ (pin + pout) and pout depends only on the local density and Lorentz factor of the forward shock.Then we calculate the ratio pin/pout for any value of E fs from the relation We combine Eqs. ( 8), ( 10) to obtain the equation that describes evolution of the forward shock Lorentz factor in its final form: In the case of ISM circumburst medium C A = 34/3 and in the case of wind-like circumburst medium C A = 6, so that Eq. ( 11) allows for a very rapid increase of the Lorentz factor, explaining the observed trise ≪ t decay . .The equality in Eq. ( 11) is approximate if the solution is not exactly self-similar, and hence, we consider C A as a semiempirical adjustable parameter.The best-fit model may require a value of C A that is somewhat different from the value given in Eq. ( 11).When fitting GRB 221009A (see Sect. 4.2), we vary this coefficient and find that the calculated lightcurve is rather sensitive to the adopted value of C A .
To estimate E fs we recall that energy transferred from the free coasting jet is transferred first to the shocked ejecta matter.This region has a kinetic energy Γ sh Msec 2 and an internal energy Ese.As the blast wave propagates, the expanding shocked ejecta does work on the adjacent region of the shocked external gas.In this process, the internal energy of the shocked ejecta, Ese, decreases, and the internal energy of the shocked swept material, E fs , increases by the same amount.We calculate the internal energy change through the relativistic adiabatic equation, pV 4/3 = const, together with expressions for internal energy (enthalpy), Eint = 4pV , and for the comoving volume, V ∝ R 2 Γ sh .Consequently, the equations for shocked ejecta 's mass, Mse, and internal energy are dMse dR = L kin Γ0c 2 dtinj dR ( 12) and We take Γ sh for the shocked ejecta Lorentz factor.In an exact hydrodynamic solution, it is approximately equal to the Lorentz factor of material at the contact discontinuity, which can be estimated through the Lorentz factor of shocked material immediately behind the forward shock, Γ sh / √ 2. However, an attempt to account for the difference of the shocked ejecta Lorentz factor from Γ sh would be fundamentally inconsistent with our treatment of the whole blast wave as a single object with zero width.
The first term in Eq. ( 13) describes energy injection from the central engine (minus energy associated with the rest mass of the reverse shock region, and minus energy radiated at the reverse shock).The second term describes the adiabatic losses.In our model for GRB 221009A we neglect radiative losses at the reverse shock, setting its radiative efficiency ϵ (rs) r to zero.This assumption is subsequently justified by the best-fit lightcurve model (see Sect. 4.3).
The energy lost in the adiabatic expansion of the shocked ejecta is transferred to the forward shock zone, and it is partially radiated.From the energy balance equation for the entire blast wave (see Eq. 3), Here the last term is the energy radiated from the reverse shock.Substituting into it Eqs.( 12), we calculate the energy of the forward shock zone Note an important difference between the integral equation for E fs and the differential equation for Ese: the first term in Eq. ( 15) refers to local value of Γ sh at a given distance, whereas the first term in Eq. ( 13) and the last term in Eq. ( 15) imply integrating Γ sh over distance.If Γ0 = const, then the derivative of the injection time over the blast wave radius is simply If Γ0 varies in time, then one has to solve Eq. ( 4) first and then differentiate.This expression completes the model's set of equations.

Dimensionless equations of the model
For convenience, we summarize all the model's equations, rewriting them in a dimensionless form to reveal the model's independent parameters.An afterglow is characterized by two dimensional and two dimensionless parameters.The first two are the isotropic equivalent kinetic energy, E kin and the dimensional deceleration time The latter is related to deceleration distance R d defined from where is the deceleration mass.One may equivalently choose density as the second dimensional parameter, but this is less convenient when the density varies with distance.
The two dimensionless parameters are the radiative efficiency of the blast wave ϵr (plus radiative efficiency of the reverse shock, ϵ (rs) r , if needed) 2 and the reduced opening angle of the jet Γ0θj, where θj is the effective opening angle of the jet.We use a Gaussian jet profile, but other choices also work with the model.Neither θj nor Γ0 is an independent parameter alone.The former only enters the lightcurve model through the reduced opening angle in combination with Γ0, whereas the latter also enters the model's equations through t d , R d , and M d , but never explicitly.For simplicity, we consider the Lorentz factor of the ejecta Γ0 as constant.Again, this is consistent with GRB 221009A observations.In addition to the source's parameters, the parameter k defines the density profile of the circumburst medium, ρ ∝ r −k , which can be either wind-like (k = 2) or a constant density (k = 0).Finally, C A is a model's adjustable factor, for which we test in our fitting procedure values around the estimate given in Eq. ( 11).
We introduce the following dimensionless variables: The dimensionless energies A dimensionless time A normalized source's kinetic power A dimensionless blast wave radius A dimensionless swept mass 2 In our simulations we assume a constant radiative efficiency.This is consistent with GRB 221009A observations.At the same time, the equations that we derive are valid for any ϵr(R) dependence.Judging from our model for GRB 221009A, the radiative efficiency of the reverse shock can be neglected in models of blast wave dynamics.
We will also use a normalized Lorentz factor The dimensionless equations of our blast wave model are: The injection time equation (from Eq. 16) The shocked ejecta energy equation (from Eq. 13) The forward shock zone energy equation (from Eq. 15) The blast wave Lorentz factor equation (from Eq. 11) A dimensionless swept mass -radius relation Equation ( 12) for the reverse shock region mass is auxiliary.The jet's kinetic power L kin (t) is not directly observed.Our assumption throughout this paper is that the released kinetic energy is proportional to the GRB's prompt luminosity.

Application to narrow jets
The model that we construct here is one-dimensional.Although the immediate application is for spherically symmetric explosions, it also works without any change in a situation when the flow lines are exactly radial.This is a good approximation if the blast wave's angular scale (set by the jet's opening angle θj) is much larger than 1/Γ sh , because the flow lines separated by an angle larger than 1/Γ are causally disconnected.All one needs in this case is to calculate the model's dimensional parameters (E (iso) kin , t d , R d , and M d ) as functions of angle in accordance to the jet's angular profile, and then solve the equations independently for each direction.
A blast wave that has decelerated to Γ sh < 1/θj has to be treated with caution.It has been suggested that in this case, the shocked material may expand sideways with near-sonic velocity, so that at later times the blast wave keeps its opening angle approximately equal to 1/Γ sh and decelerates exponentially with distance (e.g., Rhoads 1999;Sari et al. 1999).This theoretical conclusion was employed to explain some observations where afterglow lightcurves become steeper after some time.Such lightcurve breaks are now commonly considered as a manifestation of change in the blast wave's deceleration law at the moment when Γ sh ∼ 1/θj, hence the name -jet breaks.Subsequent numerical simulations, however, showed a much slower than anticipated lateral evolution (e.g., Kumar & Granot 2003).This is supported by several analytic works (see e.g.Granot & Piran 2012;Govreen-Segal & Nakar 2023).
No matter when exactly the lateral expansion starts to dominate the blast wave's deceleration law, the jet break in afterglow lightcurves always occurs when Γ sh ∼ 1/θj.Even in the absence of sideways expansion, starting from this moment, an observer sees the blast wave filling only a part of the visible zone, which is restricted to the cone with opening angle ∼ 1/Γ sh around the line of sight (the outer parts appear negligibly faint because of rapidly declining Doppler factor).So, the apparent luminosity (and the equivalent isotropic energy) is smaller compared to a spherical blast wave.We find (see Sect. 4.2) that the observed GRB 221009A lightcurve is best-fitted with a narrow jet whose opening angle is θj ∼ 1/Γ0.Moreover, our model, which assumes radial flow lines and thus ignores lateral spreading of the blast wave, demonstrates very good agreement with observations.This suggests that relativistic blast waves are indeed not so prone to lateral expansion and may preserve their original angular structure even after they decelerate to Lorentz factors less than 1/θj.

The different types of solutions
To explore the possible lightcurves expected with our model, we consider a GRB whose prompt emission has a single pulse of triangular shape and a total duration of t GRB .Again, we assume that the jet's kinetic power is proportional to the prompt luminosity, and we calculate the afterglow lightcurves for six qualitatively different scenarios.These include: very slowly decelerating blast wave with t d = 100t GRB (we will call this situation a lagging afterglow), a rapidly decelerating blast wave with t d = 0.01t GRB (we will call this situation fast afterglow), and an intermediate case with t GRB = t d .We repeat this for wind-like circumburst density profiles (we will call these lightcurves wind-type) and for constant-density circumburst media (ISM-type lightcurves).In all cases, we compare lightcurves from narrow on-axis jets with Γ0θj = 3 to lightcurves from spherically symmetric outflows (or very wide jets).
Our model lightcurves are bolometric, calculated with the theoretical value for the coefficient C A (see Eq. 11).In this section, we don't take into account photon-photon annihilation, which is included in the models fitted later to GRB 221009A.
Figure ( 4) shows wind-type lightcurves.The most remarkable feature is that all these lightcurves peak at t ≈ t GRB , and the tendency to increase the peak time with increasing t d is almost unnoticeable.However, the ratio t d /t GRB significantly influences the shape of the peak: lagging afterglows have very broad peaks, whereas fast afterglows have relatively sharp peaks.In all cases, the shape of the prompt pulse has little influence on the afterglow's lightcurves.Note that in jet models, the lightcurves not only may decay faster compared to lightcurves for spherically symmetric models, but may also have a faster rise.This is a manifestation of the same effect as in jet breaks -when the shock's Lorentz factor is smaller than 1/θj, then the blast wave does not fill the entire cone potentially visible to the observer.This reduces the averaged over visible region shock power and decreases the apparent brightness.Dimming due to this effect becomes unimportant when the accelerating blast wave starts to fulfill the condition Γ sh ≳ 1/θj, after this moment, the lightcurve's behaviour is similar to the isotropic case.We will call this phenomenon the inverse jet break.1.In all models, the radiative efficiency is ϵr = 0.2.Models with jetted outflows are for the Gaussian jet profile with a reduced width Γ 0 θ j = 3 and an on-axis line of sight.E iso,0 is the isotropic equivalent energy on the jet's axis.The effective energy plots for the same models (see Fig. 5) show a qualitative difference between them.In particular, intermediate and lagging afterglows have a very broad maximum/plateau phase, which is shifted to a later time compared to the lightcurve's peak.
Figure ( 6) shows ISM-type lightcurves.Unlike the windtype lightcurves, the peak location depends on the blast wave deceleration time and can be estimated as ≈ min(t GRB , 0.1t d ).Overall, the shape of the lightcurves' peaks follows the same pattern as for wind-like lightcurves -fast afterglows have sharp peaks and lagging afterglows have broad ones, though they never become as broad as in windtype lightcurves.In the effective energy plots (see Fig. 7), we again see the formation of a very broad maximum/plateau phase, for lagging afterglows.However, in the ISM-type solutions, and this is an important difference from the wind-type solutions, the plateau phase shifts to a later time together with the lightcurve's peak.In other words, if the plateau phase is present, then both its beginning and its end are delayed with respect to the peak of the prompt emission.
Figure 6.ISM-type lightcurves for afterglows with different t d /t GRB ratios.The prompt luminosity is scaled down by a factor 0.1.In all models the radiative efficiency is ϵr = 0.2.Models with jetted outflows are for Gaussian jet profiles with a reduced width Γ 0 θ j = 3 and an on-axis line of sight.E iso,0 is the isotropic equivalent energy on the jet's axis.8) presents separately a wind-type lightcurve that illustrates all features that we expect: the inverse jet break at an early time, then the peak, then the (regular) jet break.
As expected, the jet breaks are more pronounced in the ISM-type lightcurves.The inverse jet breaks are more pronounced in the wind-type solutions.Indeed, for an inverse jet break to appear there must be a phase of blast wave acceleration, and it readily occurs in wind-like density profiles.The existence of such a phase in a constant-density surrounding is possible only if the central engine's power as a function of time satisfies some conditions.Note that very narrow jets may have their inverse jet break coincident with the lightcurve's peak.Comparison of simulated wind-type bolometric lightcurves for spherical blast wave and for a jet with reduced opening angle Γ 0 θ j = 3.The thick gray polygonal chain follows the lightcurve for the jet solution and highlights its main features.

Lightcurve computation
We calculate jet's kinetic power under the assumption that it is proportional to the prompt luminosity, i.e.L kin = (1/η rad − 1) Lpr, where η rad is the radiative efficiency at the prompt phase.In practice, we use the count rate shown in Fig. 1 to measure Lpr and hence L kin .
The lightcurves that we calculate are bolometric, and we take into account photon-photon annihilation that arises from interaction of afterglow photons with prompt photons.The jet is structured with a constant Lorentz factor but variable kinetic power as a function of θ.The blast wave follows the angular profile of the jet, that we assume to be Gaussian.
To compute a model lightcurve we split the blast wave into many small segments, each of them subtending an angle θseg ≪ θj.Then we sum signals from all segments to obtain lightcurve for the whole blast wave.
For every segment, we calculate Γ sh (R, θ) dependence along the flow line that goes through the center of this segment at angle θ to the jet's axis.To do this we solve dimensionless equations (26, 27, 28, 29, and 30), thus we in effect ignore sideways expansion of the blast wave.Dimensional quantities are recovered by applying angle-dependent scale factors according to We consider a Gaussian jet profile and a jet's axis aligned with the line of sight.An off-axis geometry does not result in a measurable improvement of the lightcurve fit, but it increases the already large central engine's power estimate.We assume a constant and independent on the angle jet's Lorentz factor, and the same temporal The jet width correction factor fw, defined as the ratio of the apparent luminosity of a jet observed on-axis to the isotropic equivalent luminosity calculated on the jet's axis (Eq.34), for a Gaussian jet profile (Eq.32) and in the ultrarelativistic limit.The difference of the function fw(Γ 0 , θ j ) from its ultrarelativistic limit profile for L kin (t) in all directions, which is to be rescaled into dimensionless time to obtain L(τ ) that enters the equations.
Since we do not limit our study to the case Γ0θj ≫ 1, we apply jet width correction factor to relate the apparent isotropic equivalent luminosity (and hence energy) to actual on-axis luminosity (energy): Once the hydrodynamic evolution of the blast wave is calculated along all necessary directions, we proceed with calculating the bolometric lightcurve.This is done by Monte Carlo method.Namely, at every timestep we generate a photon at a random, isotropically distributed direction in the shocked matter comoving frame and assign a weight that equals the comoving-frame energy of the shocked mass element times the radiative efficiency, i.e., where dΩ is the solid angle subtended by the blast wave segment.In the next step, we apply a Lorentz boost into the lab frame (with Lorentz factor Γ sh / √ 2) and check if the photon moves at a small enough angle with respect to the line of sight (other photons are rejected).If the photon passes the direction check, its weight is multiplied by the Doppler factor, which derives from Lorentz boost from the comoving frame into the lab frame.Finally, we propagate the photon from its place of origin to the observer, calculating the probability of two-photon annihilation with another photon along its path.The main source of opacity is the prompt emission photons, for which we take the actual lightcurve (see Fig. 1) and use a spectral fit with a Band function suggested for the largest prompt emission pulse (α = −0.76,β = −2.13,E peak = 3.038 MeV, (see Frederiks et al. 2023)).Unless stated otherwise, we propagate 1 TeV photons.Those of them that escape without interaction contribute to the lightcurve.
We fit the simulated lightcurves to the set of 9 reference points shown in the upper panel of Fig. (2).The best fit is obtained by varying two parameters, C A and t d , for several values of the reduced jet width, Γ0θj.In all simulations, we keep the same radiative efficiency ϵr = 0.2.We adjust the TeV radiative efficiency, ϵ (TeV) r , to match the observed TeV fluence, varying it between different simulations but keeping it constant throughout each individual simulation.This assumption of a constant ϵ (TeV)   r is motivated by the lack of statistically significant spectral evolution in the TeV part of GRB 221009A spectrum (LHAASO Collaboration et al. 2023).It is confirmed by the fact that this assumption leads to a good lightcurve fit.
Calculating the energy injection rate we use the entire lightcurve from Fig. ( 1), and all its parts are important.Even the very weak initial pulse at the trigger time (at T * − 226 s) plays a role.By the beginning of the main phase of the central engine's activity, the blast wave started by the initial pulse already has a measurable mass.This slows blast wave acceleration and delays the afterglow's rise.

Wind models
Wind-type models produce very good fits to the data.Table 1 summarizes the parameters of the best-fit lightcurve models for several values of a reduced jet width.Good solutions not only exist but also show a degeneracy with respect to the reduced jet width.All narrow jets produce similarlylooking solutions, where the main difference is at early time -the smaller is jet width, the faster is the rise in the model lightcurve.Narrower jets require a larger normalized efficiency of TeV emission and are closer to expectations in this respect.Wider jets with Γ0θj > 1 result in progressively worse fits as the reduced jet width increases.The inverse jet break, discussed in Sect.(3.4) and seen better in the windtype model solutions, contributes to the (a priori unexpected) fast rise of the lightcurve.
Our reference solution with Γ0θj = 0.6, C A = 7.0, and t d = 130 s is shown in the top panel of Fig. (10).To illustrate influence of the adjustable parameter C A , we plot the reference solution together with two others, obtained with a smaller and a larger values of C A .The bottom panel of this figure compares the reference solution with a few others.Figure (11) shows how the blast wave's Lorentz factor evolves with observer time (i.e., the arrival time for photons emitted along the shock's normal) for the reference solution.The figure shows only a moderate decline in the Lorentz factor, about a factor 2.5 from peak to T = 3000 s.This is consistent with the absence of spectral evolution in this temporal range.
The reference lightcurve model, as well as other good fits, has discrepancies with observational data in three regionsat an early time (T < 9 s), in the interval between ≈ 33 s and ≈ 40 s, and in the interval between ≈ 250 s and ≈ 650 s.In Sect.(4.3) we argue that the discrepancies are not due to the model's deficiency but rather due to an additional signal  from another source of TeV photons that closely follows the prompt activity.Two effects mainly contribute to the puzzling fast rise of the TeV lightcurve.One is the rapidly increasing Lorentz boost at the time when energy associated with the largest pulse of the prompt emission is supplied to the blast wave and the latter starts to accelerate in response.Another equally important, factor is the inverse jet break phenomenon that we discussed in Sect.(3.4).At a very early time, when the blast wave accelerates, the observer's effective viewing angle decreases, the blast wave's emitting zone fills a larger fraction of the effective viewing angle, and the equivalent isotropic energy increases.This continues until the blast wave's Lorentz factor grows above 1/θj.Later on the emitting region fills the entire observable angle until the blast wave starts to decelerate and its Lorentz factor drops below 1/θj thus producing the usual jet break.For narrow jets, the inverse jet break phase continues all the way to the lightcurve's peak.
The observed lightcurve is also shaped by photon-photon annihilation between the outgoing afterglow photons and those from the prompt emission.The magnitude of this effect can be seen from Fig. ( 12), where we plot the fraction of escaping photons (i.e.absorbed luminosity divided by unabsorbed luminosity) as a function of time.For the reference solution (actually for all narrow jet solutions) the effect of absorption is moderate, counter to what one may naively expect.This happens for several reasons, all rooted in the fact that the target prompt photons move unidirectionally, straight along radial lines.First, the interaction rate per unit distance is proportional to (1 − cos θ), where θ is the propagation angle of the afterglow photon.The usual estimate, θ ∼ 1/Γ sh , holds for jets with not too low reduced opening angle, namely for Γ sh θj ≳ 1. Otherwise one has to use the estimate θ ∼ θj instead, thus reducing the interaction rate and increasing the pair creation threshold at the same time.This effect is clearly visible when the lightcurves calculated for different jet opening angles are compared -lightcurves   for wider jets have stronger absorption features.Second, the angle between the photon's momentum and the radial direction decreases as 1/R 2 when the photon propagates outwards and, after integrating over the distance, this introduces an additional factor 1/3 to the optical depth estimate due to reduced interaction rate alone, plus the pair creation threshold rises accordingly.Finally, the photons that are emitted (in the shock-comoving frame) within a small solid angle Ω around the radial direction have their optical depth lower by the factor Ω/(4π) compared to an average photon.Hence an optical depth τ abs results in only (1 + τ abs ) −1 rather than exponential suppression.

Constant density models
Models with a constant-density circumburst medium produce significantly worse lightcurve fits compared to wind-type models.Since the peak in ISM-type solutions is determined by the blast wave's deceleration time (see Sect. 3.4), an ISMtype model for the GRB 221009A afterglow must have small t d .In order to reproduce the plateau phase in the effective energy plot, clearly visible in the observational data (see bottom panel of Fig. 2) and extending to ≈ 120 s, a jet with a large reduced opening angle is necessary, so that the jet break is sufficiently delayed.Our search for a good fit revealed exactly this -the best ISM-type solution has parameters Γ0θj = 7, C A = 14.2, t d = 4.5 s, and Γ0 = 1000; it is shown in Fig. ( 13).The ISM-type solution is obviously a much worse fit compared to our reference wind-type model -the residuals are much larger, especially around the peak and before it.Moreover, these residuals don't correlate with the prompt activity and have regions of both excess and deficit.The most likely interpretation of such residuals is that constant-density models are not valid for GRB 221009A.Note also that by the time the TeV observational data end (at approx.3700 s) the blast wave's Lorentz factor in the best-fit ISM-type model drops to about 7 percent of its value at the lightcurve's peak.It is unclear whether this dramatic change is consistent with the absence of spectral evolution in the TeV band.Note that the count rate (but not the residuals in this region) in the last pulse (P4) is not to scale -it is multiplied by an additional factor of 5 for better visibility.When integrating the excess over time, we find that the excess associated with P4 is larger by a factor ≈ 3 than the excesses associated with P2 and P3 combined.

Residuals: possible evidence for the reverse shock emission
In Fig. ( 14) we plot the residuals for the reference lightcurve model Γ0θj = 0.6, C A = 7.0, and t d = 130 s together with appropriately scaled count rate for the prompt phase.There are three regions of statistically significant excess in observational data as compared to the model.They follow with a short delay the three largest prompt count rate pulses (P2, P3, and P4).The most natural interpretation is that the excesses are signals from the reverse shock.The brightness of the reverse shock is expected to follow the pattern of the central engine's activity (see Eq. 13), and the delay is due to the time required for the jet material to reach the reverse shock location.Interpreting the excesses as radiation from the reverse shock, we can compare its TeV radiative efficiency to that of the forward shock -in the case of P2 and P3, the reverse shock appears to be more than an order of magnitude less efficient.
The lightcurve's response to the last (P4) pulse of the prompt emission is disproportionally strong.The integral excess associated with P4 exceeds the aggregated P2 and P3 excess by the factor ≈ 3.If this is the reverse shock signal, then the radiative efficiency of the reverse shock goes up drastically at this moment, reaching a value typical for the forward shock.Alternatively, this may be due to a larger ratio of kinetic power to the jet's prompt luminosity at P4. Finally, it is also possible that at this late stage the blast wave's structure is substantially extended and the interaction of the additional kinetic energy of the jet with the blast wave takes a different form.
Another feature worth mentioning is the response to the double-peaked pulse P2.In the residuals, there is a clear signal associated with the second peak, whereas the first peak manifests itself by a much weaker signal at T ≈ 1.7 s.Most likely, the intrinsic responses to the first and the second peak of P2 are comparable, but the former appears greatly attenuated due to the inverse jet break effect.At the time when the response to the first peak of P2 should appear, the blast wave has a significantly smaller Lorentz factor and the radiation is beamed into a wider angle thus reducing the apparent brightness.This explanation implies that the jet's reduced opening angle is indeed small, Γ0θj ≲ 1, in agreement with the parameters of our reference solution.
While the residuals for the reference wind-type solution are correlated with the prompt activity and allow interpretation as reverse shock signal, the much larger residuals for the ISM-type fit do not show any correlation with the prompt activity and can be interpreted as a drawback of the ISM-type solutions.

Inverse Compton of the prompt radiation by the external shock
TeV photons in the afterglow emission originate from Comtonization of lower-energy synchrotron photons and both components are radiated by the shock-accelerated electrons.
If the afterglow overlaps with the prompt emission, the prompt photons are present at the place (and time) where the afterglow photons are produced.The prompt radiation is external with respect to the emission zone in the blast wave.So, the standard synchrotron-self-Compton model is to be complemented by an external Compton component.The impact of the external Compton component depends on how large is the energy density of prompt radiation in comparison to the energy density of synchrotron radiation from the shock-accelerated electrons.
For an estimate, consider a GRB with duration t GRB and an isotropic equivalent radiated energy E (iso) rad ≡ η rad E (iso)  GRB .In the comoving frame of the post-shock material the energy density of the prompt radiation, calculated via average luminosity, is It vanishes at large distances, where the blast wave delay with respect to light propagation time exceeds t GRB .The energy density of the post-shock material itself (in the comoving frame) is So, the ratio of these energy densities is For estimation purposes, we relate the blast wave's radius R to observer's time t obs as R = f R Γ 2 sh ct obs , where the factor f R takes into account evolution of blast wave's Lorentz factor.3Then we re-write Eq. ( 38) in terms of normalized dimensionless variables (γ, m, and τ ) introduced in Sect.(3.2): Here we calculate the kinetic energy of the GRB's ejecta as The value of ϵpr is to be compared with the energy fraction in synchrotron radiation produced by the afterglow ϵsy, and the latter is always smaller than the energy fraction in the accelerated electrons ϵe.
The value of ϵpr (given by Equation ( 39)) depends on whether the afterglow is fast (t d < t GRB , i.e. τ GRB > 1) or lagging (τ GRB < 1), and on density profile of the circumburst medium.
For a lagging afterglow in constant-density environment γ ∼ 1 and m ≈ τ 3 obs , that gives ϵpr ∼ 1/ τ GRB τ 2 obs > 1/τ 3 GRB ≳ 1.In this case ϵpr is largest at the beginning of the prompt phase and lowest towards its end.It increases dramatically for very lagging afterglows.
For a fast afterglow in constant-density environment the blast wave decelerates for most of the time.During the deceleration phase γ 2 m ≈ τ obs /τ GRB , that gives ϵpr ∼ 1.In the earliest phase, at τ obs < 1/ √ τ GRB , additional factor τ 2 obs τ GRB −1 applies.
To sum up, in every possible situation external (i.e.prompt) radiation dominates the energy density in the afterglow's emitting zone during the earliest phase, when afterglow emission overlaps with the prompt emission.From our reference model for GRB 221009A we estimate that in this burst τ GRB ≈ 0.1 (for the largest pulse), and therefore ϵpr is about two orders of magnitude larger than ϵsy (assuming fast cooling, otherwise the disproportion is even larger).Nevertheless, the observed TeV lightcurve well matches the simulated bolometric lightcurve, as if the overwhelmingly large energy density of the external radiation had no influence on Comptonization.A possible solution to this puzzle is strong Klein-Nishina suppression of the external Compton component.If the prompt radiation spectrum follows a Band function with a low-energy photon index α and peak energy E peak , then locating the afterglow synchrotron peak below Ep,sy ≲ ϵsy ϵpr ensures that Klein-Nishina suppression is strong enough to make external Compton unimportant compared to self-Compton.For the parameters of GRB 221009A (α = −0.76 and E peak = 3.038 MeV, see Frederiks et al. (2023)) and assuming ϵsy = 0.15, Eq. ( 40) implies Ep,sy ≲ 100 keV.This limit is rather constraining, but at the same time, it is not too stringent even for the earliest afterglow.Comptonization of ∼ 100 keV afterglow synchrotron photons, and even more so ∼ 3 MeV prompt photons, is indeed expected to be in the Klein-Nishina regime.Assuming Γem = 300 for the Lorentz factor of the emitting zone, we find that electrons producing 1 TeV inverse Compton photons must have the Lorentz factor γe ≳ 10 4 in the emitting zone comoving frame.This means that possible target photons are being upscattered in the Klein-Nishina regime if their energy exceeds 1 TeV/γ 2 e ≈ 10 keV (observer's frame).

DISCUSSION
Our most important findings are the following: • We find that a wind-type solution is strongly preferred over an ISM-type solution.Our best-fit solution has a narrow jet with an opening angle of θj = 0.6/Γ0 and a deceleration time t d = 130 s.For Γ0 = 500 the estimated density at the deceleration radius, R d ≈ 2 ly, is n d ≈ 3 × 10 −3 cm −3 .This corresponds to Ṁ ≈ 1.2 × 10 −6 M ⊙ /yr with V wind = 3 × 10 3 km/s.The density at the deceleration radius is proportional to Γ −8 0 and the wind's mass-loss rate estimate is proportional to Γ −4 0 .These strong dependencies enable us to limit the range of the initial Lorentz factor: 300 ≲ Γ0 ≲ 800.Here the lower limit comes from the requirement Ṁ < 10 −5 M ⊙ /yr and the upper limit from the requirement n d > 10 −4 cm −3 .
• We find three time intervals, where the observed lightcurve has statistically significant deviation from the theoretical one.All these deviations are excesses, all are well correlated in time with the three largest pulses of the prompt emission, all are slightly delayed with respect to the prompt pulses Combination of these facts motivates us to interpret the residuals as additional emission component from the reverse shock.If so, then the radiative efficiency of the reverse shock is in general much lower than that of the forward shock, being (in the TeV band) about 30 times less.
However, the last of the excesses, which presumably results from the last episode of the central engine's activity, apparently demonstrates a much higher radiative efficiency comparable to that of the forward shock.This may be a signature of a more efficient particle acceleration mechanism switching on when the reverse shock becomes stronger.Another possible interpretation of the excesses is that they result from the interaction of the jet's plasma component with free neutrons in a way suggested by (Derishev et al. 1999): the neutrons released by the jet close to its origin subsequently decay at some distance between the central engine and the reverse shock and their decay products interact with the casting jet's material.The time delay in this case is attributed to the apparent decay time of free neutrons ≈ 880 s /Γn.Interpretation of the excesses as TeV component of the prompt emission itself is the least, rather remote, possibility: in this case it is difficult to explain the systematic time delay, and the jet's Lorentz factor needs to be very large (Γ0 > 1000) to avoid two-photon annihilation of the prompt TeV photons." • We discovered that the jet of GRB 221009A is extremely narrow, its reduced width is Γ0θj ≈ 0.6.Given a Lorentz factor of ∼ 500 this corresponds to 0.07 • .This value is smaller by an order of magnitude than the value of 0.8 • derived by estimating a jet break in a constant-density surroundings by LHAASO Collaboration et al. (2023).This finding is unexpected but, besides being the best-fit solution, it is supported by several independent arguments.A likely explanation for the transition from fast rising phase to a slowly rising phase in the very early afterglow is the inverse jet break that occurs when the Lorentz factor of accelerating blast wave exceeds 1/θj which happens close to the maximum value of the Lorentz factor.
An alternative explanation for the rising phase as the result of photon-photon annihilation at early time cannot explain the entire amplitude of this phase or otherwise the absorption will form a strong depression (see Fig. 12) at the time of the second highest pulse in the prompt emission between 40 and 70 s from T * , which is not observed.Wider jets show a stronger photon-photon annihilation (as long as Γ sh θj ≲ 1).The absence of a corresponding absorption feature effectively sets a limit on the actual jet width, θj < 5 × 10 −3 rad (for Γ0 = 500).
Note also that a small reduced opening angle Γ0θj leads to a higher estimate for the relative efficiency of TeV emission.This higher TeV efficiency would put the afterglow of GRB 221009A closer to values seen in other TeV afterglows.
• We calculated lightcurves for several qualitatively different scenarios.The features that may appear in the lightcurves are: the jet break and transition to the phase of declining blast wave energy, both after the lightcurve peak, and the inverse jet break before the lightcurve peak.We were able to identify all these features simultaneously in the lightcurve of GRB 221009A.The best-fit model for this GRB is wind-type, and this conclusion is supported by the notion that inverse jet breaks are characteristic for wind-type solutions (with narrow jets), but not for ISM-type solutions.Another feature specific to wind-type solutions is present in GRB 221009A: the peak of its lightcurve is confined to the largest episode of energy release despite the fact that the blast wave deceleration time is significantly longer.We, therefore, conclude that the blast wave of GRB 221009A propagates into a stellar wind, and this is the first case where such a conclusion can be made directly from the analysis of observational data.
Towards the end of LHAASO observing time, our best-fit lightcurve (which is wind-type) declines with temporal index ≈ −1.55, that joins consistently with the X-ray afterglow decline changing from ≈ −1.5 (at approximately the same time) to ≈ −1.67 (at later time) (Williams et al. 2023).For the ISM-type model one needs an additional wide component in the jet to match the relatively slow decline after the jet break (O'Connor et al. 2023).
• We advocate the use of the effective energy plots (luminosity of the afterglow multiplied by time since its beginning, E eff ≡ Lt).The relationship between E eff and L resembles in a sense the relationship between νFν and Fν .Almost all the lightcurve features discussed in the previous paragraph (except the inverse jet break) are much better visible in such plots compared to the lightcurve representation.
• We find that a very good fit to the data assuming no spectral evolution at all.This is unexpected: as we show in Sect.(4.4), during the contemporaneous phase of the after-glow the prompt photons always dominate energy density in the afterglow's emitting region.The only way to avoid their vigorous interference with the SSC mechanism is strong Klein-Nishina suppression.In the case of GRB 221009A, this consideration implies that Klein-Nishina suppression should extend to at least down to 100 keV (in the observer's frame) placing an upper limit on location of the afterglow's synchrotron peak.

CONCLUSIONS
In this paper we propose a relatively simple hydrodynamical model for a relativistic blast wave with continuous energy supply at an arbitrarily varying rate.We treat the blast wave as a two-element structure.The central engine supplies energy to the inner part (shocked ejecta material) via the reverse shock.As the shocked ejecta material expands, its internal energy is transferred to the shocked external matter.We take into account the inertia of the shocked external material so that the pressure difference across this region determines the derivative of the blast wave's Lorentz factor.
This model was tested against the observed TeV lightcurve of GRB 221009A, which provided a unique opportunity to explore the contemporaneous phase of prompt and afterglow GRB emission.The excellent quantitative agreement between the model's predictions and the observational data, suggests that the model is valid.This, furthermore, lends support to the values of our best fit parameters that we find that indicated that the event was powered by a very narrow jet θj ≈ 0.07 • (500/Γ0) and propagated into a wind-like external medium.These properties may explain the huge isotropic equivalent energy observed in the prompt phase.Small excesses over the model's predictions that are correlated with the prompt suggestpresence of TeV signal from the reverse shock as well.

Figure 1 .
Figure 1.The count rate for the prompt phase of GRB 221009A, compiled from Konus-WIND measurements (Frederiks et al. 2023).Our assumption is that the prompt kinetic luminosity follows the count rate.

Figure 2 .
Figure 2. Upper panel: the lightcurve of GRB 221009A (energy flux F integrated over the energy range from 0.3 to 5 TeV).Lower panel: the effective blast wave energy, E eff = 4πD 2 L F × (T − T * ).The gray circles indicate reference points adopted to estimate quality of lightcurve fits (see Sect. 4).These points are located at 10 s, 12 s, 15 s, 20 s, 30 s, 60 s, 100 s, 200 s, and 1000 s.

Figure 3 .
Figure3.Schematic representation of the blast wave model.The shocked external material occupies the region between the contact discontinuity and the forward shock, whose width is ∆R ∼ R/Γ 2 sh ≪ R. The region between the contact discontinuity and the reverse shock is filled with shocked ejected material.Note that the model treats the region between the forward shock and the reverse shock as infinitely thin, yet it takes into account the pressure difference across ∆R.

Figure 4 .
Figure4.Wind-type lightcurves for afterglows with different t d /t GRB ratios.The prompt luminosity is scaled down by factor 0.1.In all models, the radiative efficiency is ϵr = 0.2.Models with jetted outflows are for the Gaussian jet profile with a reduced width Γ 0 θ j = 3 and an on-axis line of sight.E iso,0 is the isotropic equivalent energy on the jet's axis.

Figure 5 .
Figure 5. Same models as in Fig. (4) presented as plots of the efficient energy E eff = Lt.

Figure 7 .
Figure 7. Same models as in Fig. (6) presented as plots of the efficient energy E eff = Lt.

Figure (
Figure (8)  presents separately a wind-type lightcurve that illustrates all features that we expect: the inverse jet break at an early time, then the peak, then the (regular) jet break.As expected, the jet breaks are more pronounced in the ISM-type lightcurves.The inverse jet breaks are more pronounced in the wind-type solutions.Indeed, for an inverse jet break to appear there must be a phase of blast wave acceleration, and it readily occurs in wind-like density profiles.The existence of such a phase in a constant-density surrounding is possible only if the central engine's power as a function of time satisfies some conditions.Note that very narrow jets may have their inverse jet break coincident with the lightcurve's peak.
Figure 8.Comparison of simulated wind-type bolometric lightcurves for spherical blast wave and for a jet with reduced opening angle Γ 0 θ j = 3.The thick gray polygonal chain follows the lightcurve for the jet solution and highlights its main features.

Figure 9 .
Figure9.The jet width correction factor fw, defined as the ratio of the apparent luminosity of a jet observed on-axis to the isotropic equivalent luminosity calculated on the jet's axis (Eq.34), for a Gaussian jet profile (Eq.32) and in the ultrarelativistic limit.The difference of the function fw(Γ 0 , θ j ) from its ultrarelativistic limit β0 cos θ) 4 .(34) The function fw(Γ0, θj) in the ultrarelativistic limit becomes the function of reduced jet width, fw(Γ0θj).It is plotted in Fig. (9).

Table 1 .
Parameters of the best-fit lightcurve models in a windlike density profile for several values of the reduced jet width.The asterisk denotes our choice for the reference model.The value Γ (max) sh is the maximal value of the blast wave's Lorentz factor during its evolution and X TeV = emission required to fit the observed TeV fluence.

Figure 10 .
Figure 10.Upper panel: A comparison of our reference solution (obtained with C A = 7.0) to the solutions obtained with smaller (C A = 6.0) and larger (C A = 8.0) values of this coefficient.All other parameters are the same.Lower panel: The reference lightcurve (black) compared to the best-fit lightcurves obtained for other values of reduced jet width Γ 0 θ j .For numerical values of parameters that characterize all the best-fit solutions see Table (1).The reference points are the same as in Fig. (2).

Figure 11 .
Figure 11.The normalized blast wave's Lorentz factor as a function of shock propagation delay (i.e., the arrival time for photons emitted straight along jet's axis), calculated for parameters of the reference wind-type model from Table (1).

Figure 12 .
Figure12.The fraction of escaping photons for best-fit solutions with different reduced width of the jet.In these simulations we take Γ 0 = 500.

Figure 14 .
Figure14.Residuals for the reference lightcurve model (black crosses) together with prompt emission count rate (orange line, arbitrary scale).Note that the count rate (but not the residuals in this region) in the last pulse (P4) is not to scale -it is multiplied by an additional factor of 5 for better visibility.When integrating the excess over time, we find that the excess associated with P4 is larger by a factor ≈ 3 than the excesses associated with P2 and P3 combined.