Can an Off-axis Gamma-Ray Burst Jet in GW170817 Explain All the Electromagnetic Counterparts?

Gravitational waves from a merger of two neutron stars (NSs) were discovered for the first time in GW170817, together with diverse electromagnetic (EM) counterparts. To make constraints on a relativistic jet from the NS merger, we calculate the EM signals in (1) the short gamma-ray burst sGRB 170817A from an off-axis jet, (2) the optical-infrared macronova (or kilonova), especially the blue macronova, from a jet-powered cocoon, and (3) the X-ray and radio afterglows from the interaction between the jet and interstellar medium. We find that a typical sGRB jet is consistent with these observations, and there is a parameter space to explain all the observations in a unified fashion with an isotropic energy $\sim 10^{51}$-$10^{52}$ erg, opening angle $\sim 20^{\circ}$, and viewing angle $\sim 30^{\circ}$. The off-axis emission is less de-beamed than the point-source case because the viewing angle is comparable to the opening angle. We also analytically show that the jet energy accelerates a fair fraction of the merger ejecta to a sub-relativistic velocity $\sim 0.3$-$0.4$c as a cocoon in a wide parameter range. The ambient density might be low $\sim 10^{-3}$-$10^{-6}$ cm$^{-3}$, which can be tested by future observations of radio flares and X-ray remnants.

Gravitational waves from a merger of two neutron stars (NSs) were discovered for the first time in GW170817, together with diverse electromagnetic (EM) counterparts. To make constraints on a relativistic jet from the NS merger, we calculate the EM signals in (1) the short gamma-ray burst sGRB 170817A from an off-axis jet, (2) the optical-infrared macronova (or kilonova), especially the blue macronova, from a jetpowered cocoon, and (3) the X-ray and radio afterglows from the interaction between the jet and interstellar medium. We find that a typical sGRB jet is consistent with these observations, and there is a parameter space to explain all the observations in a unified fashion with an isotropic energy ∼ 10 51 -10 52 erg, opening angle ∼ 20 • , and viewing angle ∼ 30 • . The off-axis emission is less de-beamed than the point-source case because the viewing angle is comparable to the opening angle. We also analytically show that the jet energy accelerates a fair fraction of the merger ejecta to a sub-relativistic velocity ∼ 0.3-0.4c as a cocoon in a wide parameter range. The ambient density might be low ∼ 10 −3 -10 −6 cm −3 , which can be tested by future observations of radio flares and X-ray remnants. galaxy has not been identified so far. In GW170817, the situation has been revolutionized by the discovery of EM counterparts.
An sGRB is one of the brightest EM events in the Universe, caused by a relativistic jet. A typical sGRB within the current GW horizon ∼ 100 Mpc should be very bright if the jet points to us, while an off-axis jet is generally very faint [59,60] and hence an sGRB is not seriously thought to be the first to be detected, considering a low probability for an on-axis jet at first glance. (2) Second, an sGRB jet produces an afterglow in broad bands via interaction with the interstellar medium (ISM) [61]. For off-axis observers, the early afterglow looks faint [62], and the decaying nature of the afterglow emission makes the detection not so easy. (3) Third, a small amount of NS material ejected from the NS mergers is expected to emit optical-infrared signals [63], the so-called "macronova" [64] and "kilonova" [65]. 2 A macronova was thought to be the most promising and has therefore been intensively studied. From the theoretical side, general relativistic simulations demonstrate the matter ejection with mass M e ∼ 10 −4 -10 −2 M ⊙ from binary NS mergers [66][67][68] (see also Refs. [69,70] for BH-NS mergers). The ejected matter is expected to be neutronrich, so that the rapid neutron capture process (r-process) takes place to synthesize heavy elements such as gold, platinum, and uranium, as a possible origin of the rprocess nucleosynthesis [71,72]. The radioactive decay energy of the r-process elements heats the merger ejecta, giving rise to a macronova [65,73,74]. The r-process elements, in particular the lanthanides, also increase the opacity of the ejecta to κ ∼ 1-10 cm −2 g −1 , making the emission red and long-lasting [73][74][75]. A macronova could also be powered by the central engine of an sGRB (see, e.g., Refs. [76][77][78]). After an NS merger, either a BH or an NS is formed. The central engine releases energy through a relativistic jet [79], disk outflows, and/or magnetar winds [80][81][82], which may be observed as prompt, extended, and plateau emissions in sGRBs [83][84][85][86]. These outflows and emissions can heat the ejecta and power a macronova.
From the observational side, a macronova candidate was detected as an infrared excess in sGRB 130603B [87,88]. The required mass is relatively large > 0.02M ⊙ compared with a typical ejecta mass in the simulations if the macronova is powered by radioactivity [89]. (4) Fourth is a radio flare [90][91][92] and the associated X-ray remnants [93] through the interaction between the merger ejecta and the ISM. These signals appear years later.
Very interestingly, the observed EM counterparts to GW170817 do not completely follow the above expectations: (1) First, a faint sGRB 170817A was detected with an isotropic-equivalent energy E iso ∼ 5.35 × 10 46 erg [22][23][24]. 3 This could arise from an off-axis sGRB jet, but it looks like a lucky event and we should clarify whether the signal can be produced by a typical sGRB jet or not. (2) Second, the observed optical-infrared emissions are likely a macronova, but very bright and blue at ∼ 1 day before becoming red in the following ∼ 10 days. Although the blue macronova could be produced by viscously driven outflows from an accretion disk around the central engine [95][96][97], the required ejecta mass is uncomfortably huge ≥ 0.02M ⊙ with a small opacity κ ≤ 0.5 cm −2 g −1 to explain by r-process radioactivity [26, 27, 29-32, 34-36, 38, 40-42, 45]. The red macronova also demands a huge mass ≥ 0.03M ⊙ . These tensions motivate us to explore the contributions from jet activities to the macronova emission. In particular, a prompt jet has to penetrate the merger ejecta [98,99] and inevitably injects energy into a part of the merger ejecta to form a cocoon [100,101]. We should improve analytical descriptions to calculate the observables as functions of the jet properties because the previous formulae are mainly for long GRB jets propagating in static (not expanding) stellar envelopes [102,103].
(3) Third, the observed X-ray and radio afterglows are faint with marginal detections, despite the closest sGRB ever detected. We should check whether a typical sGRB jet is consistent with the observations or not.
Related to all the above points, this time, the GW observations give an important constraint on the inclination angle 32 • (1σ) between the binary orbital axis and the line of sight [1,104]. Intriguingly this angle is comparable with the mean opening angle of an sGRB jet, ∆θ = 16 • ± 10 • (1σ), which is obtained by observing the jet break of the light curve in addition to the non-detection of the jet break at the observation time [105]. This finiteness of the jet size reduces the de-beaming of the off-axis emission than the point-source case.
In this paper, in order to solve the above questions, we consider a jet associated with a neutron star merger in GW170817 and investigate its appearances in sGRB 170817A, the optical-infrared macronova, and X-ray and radio afterglows. We then constrain the jet properties, such as the on-axis isotropic energy E iso (0), opening angle ∆θ, and viewing angle θ v , seeking whether a unified picture is possible with a typical sGRB jet or not as in Fig. 1.
The organization of the paper is as follows. In Sect. 2, we carefully calculate the off-axis emission from a top-hat jet with uniform brightness and a sharp cutoff to encompass the allowed parameter region in the plane of E iso (0)-∆θ, based on the formulation of Ioka & Nakamura [59] (see also Appendix A). In Sect. 3  merger ejecta to derive the breakout conditions taking the expanding motion of the merger ejecta into account. In Sect. 4, we calculate the expected macronova features, such as the flux, duration, and expansion velocity, by improving the analytical descriptions. In Sect. 5, we estimate the rise times and fluxes of the X-ray and radio afterglows to constrain the jet properties and the ambient density. In Sect. 6, we discuss alternative models, and also implications for future observations of the radio flares and X-ray remnants. Sect. 7 is devoted to the summary. The latest observations made since submission are interpreted in Sect. 7.1.

sGRB 170817A from an off-axis jet
The observed sGRB 170817A [2,23,24] constrains the properties of a jet associated with GW170817. Emission from the jet is beamed into a narrow (half-)angle ∼ 1/Γ where Γ is the Lorentz factor of the jet, while off-axis de-beamed emission is also inevitable outside ∼ 1/Γ as a consequence of the relativistic effect (see Fig. 1). To begin with, we consider the most simple top-hat jet with uniform brightness and a sharp edge (see Sect. 6.1 for the other cases). For a top-hat jet, we can easily calculate the isotropic energy E iso (θ v ) as a function of the viewing angle θ v by using the formulation of Ioka & Nakamura [59] and Appendix A. Even if the observed sGRB is not the off-axis emission from a top-hat jet, we can put the most robust upper limit on the on-axis isotropic energy E iso (0) of a jet, whatever the jet structure and the emission mechanism is. 4/25

Isotropic energy
The emission from a top-hat jet is well approximated by that from a uniform thin shell with an opening angle ∆θ. We can analytically obtain the observed spectral flux in Eqs. (A1) and (A2) [59] as The isotropic energy is obtained by numerically integrating the above equation with time and frequency as E iso (θ v ) ∝ Tend Tstart dT νmax νmin dν F ν (T ) in Eq. (A4). If the emission comes from multiple jets, they usually overlap with each other, but we can simply add all the isotropic energy 4 assuming that the jets have similar ∆θ and Γ.
In Fig. 2, we calculate the isotropic energy as a function of the viewing angle of a jet with opening angles ∆θ = 15 • , 20 • , 25 • and Γ = 100. We normalize E iso (θ v = 30 • ) = 5.35 × 10 46 erg, as observed by Fermi/GBM and INTEGRAL [2,23,24], at the fiducial viewing angle θ v = 30 • , which is consistent with the inclination angle 32 • between the binary orbital axis and the line of sight obtained from GWs [1,104].
The important point in Fig. 2 is that the viewing angle dependence of E iso (θ v ) for a jet with a finite opening angle ∆θ > 1/Γ is quite different from the point-source case. For a point source, there is a well-known relation E iso (θ v ) ∝ δ(θ v ) 3 between the isotropic energy E iso (θ v ) and the viewing angle θ v , or the Doppler factor δ(θ v ) = 1/Γ(1 − β cos θ v ). However, this relation is not applicable if the jet size is finite and larger than ∆θ > 1/Γ. As shown in Fig. 2 and Eqs. (A11) and (A12), the observed isotropic energy E iso (θ v ) is constant if the viewing angle is within the opening angle ∆θ. Outside ∆θ, the relation is initially shallower than the point-source case; i.e., if the viewing angle is within twice the opening angle ∆θ < θ v 2∆θ, the relation is approximately given by where the modified Doppler factor is and we assume Γ ≫ 1 and θ v − ∆θ ≪ 1 in the last equality. This is roughly Fig. 2). The reason for the difference is that the flux to the observer is dominated by the jet edge, not the jet center. For a large enough viewing angle, i.e., θ v 2∆θ, the relation goes back to the point-source case.
Guided by the analytic equation (2), we fit the envelope of E iso (θ v = ∆θ) at the jet edge in Fig. 2. This gives an upper limit on the on-axis isotropic energy of a jet associated with sGRB 170817A observed by Fermi/GBM and INTEGRAL [2,23,24] as which is applicable for Γ −1 ≪ ∆θ and ∆θ < θ v 2∆θ. 4 It is not so simple to calculate the isotropic luminosity because it depends on the degree of the overlap of pulses, which depends not only on the viewing angle but also on the pulse structure [60,106].

5/25
Viewing angle θ v of the jet    [2,23,24], at the fiducial viewing angle θ v = 30 • (cyan vertical line), which is consistent with the inclination angle 32 • obtained from GWs [1,104]. The envelope of E iso (θ v = ∆θ) at the jet edge is also plotted with the fitting formula in Eq. (4) (green dotted line).
In Fig. 3 (for Γ = 100; black thick line) and Fig. 4 (for Γ = 200; black thick line), we plot the upper limit on the on-axis isotropic energy in Eq. (4) as a function of the opening angle ∆θ with the fiducial viewing angles θ v = 30 • and 20 • , which are consistent with the inclination angle 32 • obtained from GWs [1,104]. We adopt two cases Γ = 100 and 200 since the Lorentz factor of sGRBs is not well constrained. Although much larger lower limits Γ 1000 have been derived for sGRB 090510 detected by the Fermi/LAT [107], these limits rely on the one-zone model, and are reduced by a factor of several in multi-zone models [108][109][110]. As for long GRBs, Hascoët et al. [111] obtain density-dependent lower limits Γ > 40-300, and Nava et al. [112] obtain upper limits Γ < 200 for a homogeneous density medium and Γ < 100-400 for a wind-like medium.
In Figs. 3 and 4 (the vertical range of the orange square), we also plot the range of the isotropic energies, E iso = 4.33 × 10 49 -4.54 × 10 52 erg, for the past sGRBs that are thought to be on-axis because they satisfy the E p -E iso (Amati) and E p -L iso (Yonetoku) relations [113][114][115]. As we can see from Figs. 3 and 4, a top-hat jet with typical on-axis isotropic energy E iso (0) can explain the faint sGRB 170817A if the viewing angle of the jet edge is in the range with Eq. (4). 6/25   In Figs. 3 and 4 (the horizontal range of the orange square), we also plot the range of the mean opening angle ∆θ = 16 • ± 10 • (1σ), which is obtained by observing the jet break of the light curve in addition to the non-detection of the jet break at the observation time [105]. A top-hat jet for sGRB 170817A can also take these typical opening angles unless

Spectrum
Although spectral information is important for discriminating models, sGRB 170817A is faint and it is difficult to draw a robust conclusion based on its spectrum. Detailed analysis 7/25 of sGRB 170817A revealed two components to the burst: a main pulse with ∼ 0.6 s and a weak tail with 34% the fluence of the main pulse [2]. The main pulse is best fitted with a Comptonized spectrum with a power-law photon index of −0.62 ± 0.40 and peak energy E p = 185 ± 62 keV, while the weak tail has a softer blackbody spectrum with k B T = 10.3 ± 1.5 keV [2]. The de-beamed emission from an off-axis top-hat jet tends to have a low spectral peak at where the Doppler factorδ(θ v ) is given by Eq. (3). This is consistent with the observed E p of the main pulse within 3σ and also with the k B T of the weak tail.
On the other hand, if we believe that the central value of the peak energy E p = 185 ± 62 keV is correct for the main pulse, the on-axis peak energy lies outside the E p -E iso (Amati) and E p -L iso (Yonetoku) relations [113][114][115], implying a different emission mechanism. In any case, we should keep in mind that GRB 170817A could have been ∼ 30% dimmer before falling below the on-board triggering threshold [22]. It is also detected just before entering the South Atlantic Anomaly. In addition, the well-known correlation between E p and the peak luminosity for each pulse possibly biases the peak energy toward a high value for a tip-of-the-iceberg event.
The spectral shape above the peak energy is also not measured well, so that the compactness problem does not give a strong limit on the Lorentz factor. The most conservative case is that the spectrum is sharply cut off above the peak energy. In this case, the electron and positron pairs are not created if the peak energy in the comoving frame ∼ ΓE p (0) is less than the electron rest mass energy m e c 2 , which only gives a weak constraint on the Lorentz factor: 5 With Eq. (6), this gives an upper limit on the viewing angle, On the other hand, if we assume that the spectrum above the peak energy is exponentially cut off, the optical depth exceeds unity unless the minimum Lorentz factor is Γ 100 [Γ(θ v − ∆θ)/10] 4/3 [158]. The cutoff shape, e.g., the index λ in the cutoff exp[−(E/E p ) λ ], depends on the emission mechanism, which is still unknown and future observations are anticipated. Note also that the optical depth is angle dependent near the photosphere [155], and the Doppler factor is not the only control parameter.

Jet breakout
An NS-NS merger gives rise to matter ejection with masses M e ∼ 10 −4 -10 −2 M ⊙ and velocities 0.1-0.3c in a quasispherical manner before the jet launch [66][67][68]. Simulations of numerical relativity actually show that the mass of M e ∼ 10 −2 M ⊙ is ejected [116] from a system similar to that observed by GWs with the NS masses 1.17-1.60M ⊙ and total mass 2.74 +0.04 −0.01 M ⊙ [1]. The GWs place a 90% upper limit on the tidal deformability Λ 1 1500 and Λ 2 3000 in the low-spin case (see Fig. 5 in Ref. [1]), disfavoring an equation of state (EOS) 5 The opacity due to electrons associated with protons typically gives a lower limit of about Γ 50.

8/25
for less-compact NSs such as MS1. The compact, deep gravitational potential strengthens the shock heating, rather than the tidal torque, at the onset of the merger, enhancing mass ejection to the orbital axis. In addition to the dynamical mass ejection, neutrino-driven winds [117][118][119] and more importantly viscously driven outflows from an accretion disk eject mass to the jet axis [95][96][97][120][121][122][123], which is increased by mass asymmetry, although a robust conclusion should wait for general relativistic simulations with magnetic fields [124][125][126].
The jet has to penetrate the merger ejecta to be observed as the sGRB [98,99,101]. In particular, the breakout time t br should be less than the delay time ∆T 0 ∼ 2 s of the sGRB 170817A from the GW detection. Note that the delay time is the sum of the launch time of the jet t j , the breakout time t br , and the starting time of a single pulse in Eq. (A5), due to the difference between the straight path to the center and the path via the emission site at a radius r 0 , i.e., a kind of curvature effect, where we assume θ v − ∆θ > 1/Γ in the last equality. Even if the breakout is very fast, the sGRB may not start immediately. The breakout condition t br < ∆T 0 ∼ 2 s is the necessary condition for the sGRB. Hereafter we assume t j ≪ ∆T 0 for simplicity (see Sect. 6.5 for discussions).
The jet head velocity is determined by the ram pressure balance between the shocked jet and the shocked ejecta, both of which are given by the pre-shock quantities through the shock jump conditions, where is the relative Lorentz factor between the jet head (h) and the jet (j) or the ejecta (e) and β AB = (β is the corresponding relative velocity (see, e.g., Refs. [127,128]). We can neglect the internal pressure of the jet P j and the ejecta P e . Then the relative velocity between the jet head and the ejecta is where the ratio of the energy density between the jet and the ejecta is In the last equality, we assume the cold ejecta h e = 1, and use the jet cross section Σ j = πr 2 j and the (one-sided) jet luminosity L j . The jet luminosity is given by the on-axis isotropic energy, opening angle, and duration of the jet activity t dur as where ǫ γ ∼ 0.1 is the γ-ray efficiency. 9/25 The ejecta density at time t is The dynamical mass ejection to the orbital axis is primarily caused by the shock heating at the onset of the merger rather than the tidal torque. While the ejected mass to the orbital axis is relatively smaller than that to the orbital plane [68], the GWs disfavor an EOS for less-compact NSs [1], implying efficient shock heating [66,68]. Viscous outflows from an accretion disk also add mass to the jet axis [95][96][97][120][121][122][123]. Most of the dynamical ejecta has a velocity of β e ∼ 0.2, although the head of the dynamical ejecta is rapid [121] even up to ultrarelativistic speeds [129]. The velocity of viscous outflows is thought to be moderate β e ∼ 0.03-0.1.
First we consider the case that the jet is not collimated. Then the cross section of the jet at the breakout time is Σ j ∼ π(∆θcβ e t br ) 2 , so that Eqs. (12), (13), and (14) yield where t dur is the jet duration. The breakout time is determined by the condition that the jet head moves through the ejecta size, because the jet head velocity is slow in the early phase when the ejecta density is high. This yieldsL ≃ β 2 e /(1 − 2β e ) 2 with Eq. (11) for β j ≃ 1, and therefore The parameter dependence is different from that for the jet breakout from a stellar envelope [100,130], because the merger ejecta is moving outward and the jet head velocity at the breakout automatically becomes comparable to the ejecta velocity β h ∼ 2β e , not very fast or slow as in the case of the stellar breakout. Next we consider the collimated case. The shocked jet and the shocked ejecta go sideways from the jet head and form a cocoon [102,103,131]. If the cocoon pressure becomes higher than the jet pressure, the jet is collimated and the propagation is modified. The collimated jet dynamics was studied in the context of long GRBs [102,103,132] Substituting Eqs. (13) and (14) and z h ∼ cβ e t br into the above equation, we obtain the breakout time of the collimated jet as where we take into account that the opening angle after the breakout becomes narrower than the initial one ∆θ ∼ ∆θ 0 /3 because of the acceleration at the jet breakout [103]. 6 The condition for the collimation is given byL ≤ ∆θ −4/3 0 [102]. The breakout time is given by the shorter of Eqs. (17) and (19).
In Fig. 3 (blue dotted line), we plot the condition for the breakout to occur before the sGRB t br < ∆T 0 ∼ 2 s. We can see that the breakout is possible for typical sGRBs. In applying Eqs. (17) and (19), we should be careful about the duration of the jet activity t dur . In the on-axis case, the jet duration t dur is usually equal to the observed sGRB duration T 90 . This is not always the case for the off-axis jet. The apparent duration measured by observers is given by where ∆T is the duration of a single pulse in Eq. (A8), and if ∆θ < θ v 2∆θ and 1/Γ ≪ ∆θ, Even if the jet duration is much shorter than t dur ≪ 2 s, the observed duration may be T 90 ∼ 2 s as observed. 7 To be conservative, we take t dur > 0.03 s, which is nearly the shortest duration of the observed sGRBs.

Blue macronova powered by a jet?
The jet propagating through the merger ejecta injects energy into the cocoon, which is the mixed sum of the shocked jet and the shocked ejecta. The injected energy accelerates a part of the merger ejecta, and also heats the ejecta, contributing to the macronova emission [76,79,86,100,101]. We consider the uncollimated case, which is mainly relevant to our case. The injected energy from two-sided jets is estimated from Eqs. (13) and (17) as which is interestingly independent of the jet luminosity. The shocked fraction of the merger ejecta is f c ∼ (β ⊥ /β h ) 2 /2 ∼ (β ⊥ /2β e ) 2 /2, where the lateral velocity of the shock is β ⊥ ∼ E inj /f c M e c 2 , and therefore which is also interestingly independent of the ejecta mass. This gives the cocoon velocity and mass: Note that the cocoon mass is comparable to the ejecta mass and proportional to M c ∝ ∆θ, not so small ∼ (∆θ) 2 /2 ∼ 0.05(∆θ/0.3) 2 as in the case of the jet breakout from the stellar envelope. This is because the jet head velocity is naturally tuned to the ejecta velocity β h ∼ 2β e at the breakout in Eq. (16) and the lateral velocity of the shock is also comparable to the ejecta velocity β ⊥ ∼ 2β e for typical opening angles ∆θ in Eq. (23). The large cocoon mass with M c ∝ ∆θ in the jet breakout from merger ejecta has not been analytically pointed out so far, as far as we know. The energy injected by the jet is released at the photospheric radius r ph ∼ cβ c t MN of the macronova emission at the peak time t MN . This is larger than the radius of the energy injection r br ∼ cβ e t br , so that the adiabatic cooling reduces the released energy as where we omit the parameter dependence of β c /β e in the last expression. Let us first compare the jet energy in Eq. (26) with the energy released by radioactive decays in the macronova emission. The merger ejecta is likely neutron rich and a possible site of r-process nucleosynthesis [65,71]. Synthesized nuclei are unstable and the radioactive energy can also power a macronova [63,64]. The dominant contribution to the macronova emission is determined by the radioactive heating rateε r at the peak time t MN because the energy injected before t MN is adiabatically cooled down. Then the radioactive energy in the macronova emission is estimated as where we adopt the heating rateε r = 2 × 10 10 (t/1 day) −1.3 erg s −1 g −1 , which gives a reasonable agreement with nucleosynthesis calculations for a wide range of the electron fraction Y e [72], and the thermalization factor ǫ th ∼ 0.5, which is a (time-dependent) fraction of the decay energy deposited to the ejecta at t MN ∼ 1 day [133,134]. Note that there still remain uncertainties in the released energy E r by a factor of 2-3 due to the nuclear models, in particular the abundance of α-decaying trans-lead nuclei [135]. The jet energy in Eq. (26) dominates the radioactive energy, E jet > E r , if the opening angle is wide enough, This is shown in Figs. 3 and 4 (red vertical line) for the breakout time t br = 2 s, the peak time of the macronova t MN = 1 day, and the ejecta velocity β e = 0.2. We can see that if the viewing angle is 20 θ v 30 • , there is a parameter space for the jet to dominate the macronova energy, while if θ v 20 • , the prompt jet alone cannot dominate the macronova energy. Note that the ejecta mass M e is canceled in Eq. (28). Now let us consider the observed macronova. The observed temperature T MN and luminosity L MN suggest that the emission region is different between at t MN ∼ 1 day and 10 day. In particular, the macronova is blue at t MN ∼ 1 day and becomes red later [2]. The photospheric velocity Ω ∼ 0.5 is the fraction of the solid angle of the emission region. The different emission regions indicate some structures in the polar or radial direction [32,136]. Such structures of the density and composition could be shaped by the jet activities. The blue macronova emission at t MN ∼ 1 day naturally come from the cocoon accelerated by the jet. This is because the photospheric velocity ∼ 0.3-0.4c is faster than the typical velocity of the dynamical ejecta ∼ 0.2c 8 and the disk outflows ∼ 0.03-0.1c obtained in the numerical simulations [95][96][97][120][121][122][123], but is consistent with the cocoon velocity β c ∼ β 2 ⊥ + β 2 e ∼ 0.4 in Eqs. (23) and (24). The duration of t MN ∼ 1 day is also consistent with the diffusion time of photons in the cocoon, where B ≈ 13.7 is an integration constant following Arnett [137] and κ is the opacity. Here the opacity is increased by the r-process nucleosynthesis [73,74,138] and in particular is very sensitive to the amount of lanthanide elements [73,75]. The merger ejecta along the jet, i.e., the shock-heated dynamical ejecta and the disk outflows, tend to have a large electron fraction Y e ∼ 0.25-0.4 [95][96][97][120][121][122][123], producing only r-process elements below the second peak. This leads to a small opacity κ ∼ 0.1-1 cm 2 g −1 [96,139], compared with that of the dynamical ejecta κ ∼ 10 cm 2 g −1 . An intermediate opacity κ ∼ 1 cm 2 g −1 could also be realized by the turbulent mixing of the dynamical ejecta and the disk outflows in the cocoon. The radiated energy of the blue macronova at t MN ∼ 1 day is too large ∼ 7 × 10 46 erg to be explained by the radioactivity if the ejecta mass is typical M e ∼ 0.01M ⊙ as in the numerical simulations [66,68]. The radioactive model requires large ejecta mass M e ∼ 0.02M ⊙ (for large energy) as well as a small opacity κ ∼ 0.1 cm 2 g −1 (for a t MN ∼ 1 day timescale). This suggests another energy source such as the jet-powered cocoon, although this is not definite given the uncertainties about the observations and the modelings of the heating and the density profile. The (prompt) jet can inject energy in Eq. (26) that dominates the radioactive energy in Eq. (27) for the macronova emission if the opening angle is wide enough in Eq. (28). Then the required ejecta mass is reduced to M e < 0.01M ⊙ , which may be affordable by the conventional dynamical ejection [89] or the disk outflows with reasonable viscous parameters [97,116]. In addition, the required opacity goes back to a moderate value for a t MN ∼ 1 day timescale.

X-ray and radio afterglows of a jet?
The jet interacts with the ISM and produces afterglow emission by releasing the kinetic energy. Initially the afterglow emission is beamed into the direction of the jet and is difficult to detect by off-axis observers. As the jet is decelerated by the ISM, the beaming angle becomes wide and the afterglow begins to be observable by off-axis observers [140]. The observable condition is i.e., the beaming angle becomes larger than the viewing angle of the jet edge. Since the evolution of the Lorentz factor is easily calculated [140], we can estimate the rise time of the afterglow from Eq. (31) as where n is the ambient density (and could be small as discussed below). For our interest in a wide jet in Eq. (28), this is usually earlier than the jet break time, After this time t jet , the Lorentz factor drops below Γ < ∆θ −1 and the jet's material spreads laterally, producing a break in the light curve of the afterglow [140]. By using the standard afterglow model, in particular the spherical model before the jet break [61], the characteristic synchrotron frequency and the peak spectral flux at time t = 15 day t 15d are given by where E = 10 52 erg E 52 is the total energy of the spherical shock, n = 10 −4 cm −3 n −4 is the ambient density, ǫ e = 10 −1 ǫ e,−1 and ǫ B = 10 −6 ǫ B,−6 are the energy fractions that go into the electrons and magnetic field, respectively, D = 40 Mpc D 40Mpc is the distance to the source, and we use the power-law index p = 2.2 for the accelerated electrons. Note that ǫ e = 10 −1 and ǫ B = 10 −6 are within typical values obtained from afterglow observations, although ǫ B = 10 −6 is at the lower end [141]. For typical parameters, the cooling frequency is too high and the self-absorption frequency is too low to observe at this time. The fluxes at radio ν = 1 GHz ν GHz and X-ray ν = 1 keV ν keV are estimated as The actual fluxes should be less than the above spherical estimates by a factor of a few because we are observing the jet-like edge and there is no emission outside the jet-like edge. X-ray and radio observations have shown possible counterparts to sGRB 170817A [2,47,50], and we can see that they are consistent with the above estimates for a typical off-axis afterglow. First, the rise time in Eq. (32) fits the observations. Following early non-detections, delayed X-ray emission is detected 9 days after the merger at the position of the macronova by 50 ks Chandra observations [47]. This is followed by the radio discovery 16 days after the merger [50]. To see the allowed parameter region for the on-axis isotropic energy E iso (0) and opening angle ∆θ of the jet, we plot the line for t rise = 15 days in Figs. 3 and 4 (magenta curved region) by varying the density in the range n = 10 −5 -10 −3 cm −3 . One reason for adopting these low ISM densities is that the host galaxy NGC 4993 is of E/S0 type (and the other is the faint afterglow fluxes; see below). As we can see from Figs. 3 and 4, a top-hat jet for sGRB 170817A (black thick line) can reproduce t rise = 15 days (magenta curved region) 14/25 in the region of typical sGRB parameters (orange square). Even if we consider the top-hat jet as an upper limit, there is a broad parameter space for t rise = 15 days.
The observed fluxes of the radio and X-ray afterglows are also consistent with our estimates in Eqs. (36) and (37) (divided by a few due to the edge effect). In particular, the flux ratio between radio and X-rays agrees with the synchrotron spectrum with a typical power-law index p ∼ 2.2 for accelerated electrons, which reinforces the interpretation. The observed fluxes are not bright, despite the very close distance to the source, and therefore suggest a low ambient density n ∼ 10 −3 -10 −6 cm −3 , not so strange for the E/S0 host galaxy NGC 4993, unless the jet energy is small E ≪ 10 51 -10 52 erg s −1 or the microphysics parameters ǫ e and ǫ B are small (see Sect. 6.3 for more discussions). Both the fluxes are expected to decline similarly in Eqs. (36) and (37) after the peak time, which is later than the rise time t rise by a factor of several. Since the X-rays are now unobservable until early December due to the Sun, continuous radio observations are important.

sGRB 170817A in other models
A top-hat jet is a good approximation if the energy varies with angle θ v more steeply than (2) outside the opening angle ∆θ. If this is not the case, the jet is structured (see, e.g., Refs. [142,143]) and detectable for a broader range of viewing angles [144][145][146][147]. Even for the structured jet, the upper limits from a top-hat jet in Figs. 3 and 4 (black thick line) are applicable. Although some simulations of the jet propagation show a structured jet after the breakout (see, e.g., Refs. [148,149]), numerical diffusion of baryons across the jet boundary is difficult to control under the current resolution [103] and the jet structure down to the observed isotropic energy E iso (θ v ) ∼ 5 × 10 46 is difficult to resolve in the present numerical calculations. Furthermore, the part of the jet that goes to a large viewing angle usually has a low Lorentz factor Γ ∼ θ −1 v ∼ 2(θ v /30 • ) −1 [101], and could still be opaque at the observed time T 90 ∼ 2 s. In this case, we expect thermal emission from the cocoon [130,131].
The other feasible mechanism is the scattering of the prompt emission by the merger ejecta or cocoon to a large viewing angle [77,153]. In this mechanism, the scattered E p is similar to the on-axis one, consistent with the main pulse [154]. This is discussed in our other paper [154].

Macronova in other models
We should remind ourselves that long-lasting jets following the prompt jet could also inject less energy but make a more efficient contribution to the macronova emission than the prompt jet [76,77,86]. The longer the injection duration ∼ t dur , the smaller the required 15/25 energy E inj ∼ 10 48 erg (t dur /10 4 s) −1 for the macronova emission because of lower adiabatic cooling. Such long-lasting activities are observationally indicated in previous sGRBs: prompt emission is followed by extended emission with t dur ∼ 10 2 s and E iso ∼ 10 51 erg and plateau emission with t dur ∼ 10 4 s and E iso ∼ 10 50 erg (see Refs. [83][84][85][86] and references therein). The rapid decline of the light curves is only produced by activity of the central engine [156]. These long-lasting jets are too faint to observe in sGRB 170817A, consistent with the observations. Considering that even the prompt jet is not negligible in this event, the long-lasting jets could provide almost all of the energy of the macronova emission, in particular the blue macronova, without appealing to the radioactive energy.
The red macronova emission at ∼ 10 day is an analog of the infrared macronovae observed in sGRB 130603B [87,88] and 160821B [157,158]. At ∼ 10 day after the diffusion time in Eq. (30), the cocoon is transparent and not relevant to the emission. The r-process radioactivity is widely discussed as an energy source, and the long timescale is attributed to the high opacity κ due to the r-process elements, in particular lanthanide elements [73,75]. However, the required ejecta mass is again relatively huge, at least M e ∼ 0.02M ⊙ for sGRB 130603B [89] and M e ∼ 0.03M ⊙ in this event [26, 27, 29-32, 34-36, 38, 40-42, 45]. Similar to the blue macronova at t MN ∼ 1 day, which could be powered by a jet, the red macronova could also imply other energy sources.
One attractive possibility for the red macronova at ∼ 10 days is the X-ray-powered model [78]. This model is motivated by the mysterious X-ray excess observed at ∼ 1-6 days with a power-law evolution in sGRB 130603B [159], which somehow has a similar flux to the macronova observed in the infrared band. We can interpret the infrared macronova as the thermal re-emission of the X-rays that are absorbed by the merger ejecta. The model naturally explains both the X-ray and infrared excesses observed in sGRB 130603B with a single energy source such as a central engine like a BH, and allows for a broader parameter region, in particular smaller ejecta mass ∼ 10 −3 -10 −2 M ⊙ and smaller opacity than the r-process model. The X-ray-powered model is also applicable to the macronova at t MN ∼ 10 day in this event sGRB 170817A [160]. Since the X-rays from the central engine are easily absorbed by the ejecta, it is difficult to find an observational signature of the central engine activity by off-axis observers in this event, and it is only possible at late time [161].
Note that the comparison between this event and the previous sGRB observations suggests considerable diversity in the properties of macronovae, despite the similar physical conditions that are expected in NS-NS mergers [162,163]. While this diversity may come from the merger type (NS-NS vs. BH-NS) and the binary parameters (mass ratio, spins etc.), it may imply energy injection from the central engine, which has more complexities than mass ejection at the mergers.
The blue to red evolution of the macronova is also expected of dust formation [164]. Dust grains, even a few, provide a large opacity without r-process elements and re-emit photons at infrared wavelengths. The dust model predicts a spectrum with fewer features than the r-process model and could be tested by spectral observations [32][33][34] (see also Ref. [94]).

Afterglows in other models
The X-ray and radio afterglows may originate from mildly relativistic outflows rather than the main jet. Such mildly relativistic outflows could arise from several mechanisms. First, 16/25 part of the merger ejecta could be accelerated to a relativistic speed via the shock breakout at the onset of the merger [129]. Second, part of the cocoon material could be mildly relativistic, depending on the amount of mixing between the jet and the merger ejecta or the density structure of the merger ejecta [90,101,130]. These mechanisms are difficult to calculate numerically because only a small part of the mass becomes relativistic and the relevant range of the density is huge. Mildly relativistic outflows have a wider opening angle than the main jet, and therefore a good chance of pointing towards observers. The outflows are decelerated by collecting ∼ Γ −1 of their rest mass from the ISM at the time which corresponds to the rise time of the afterglow emission. This is consistent with the discovery times of the X-ray and radio afterglows. The expected fluxes in Eqs. (36) and (37) are also consistent with the observations by choosing appropriate ǫ B . Because the energy of the outflows is usually smaller than that of the main jet, the ambient density tends to be higher than the jet case n ∼ 10 −3 -10 −6 cm −3 (see Sect. 5). But too high a density n > 10 −2 cm −3 cannot accommodate the rise time of the afterglows in Eq. (38) if the outflow energy is E < 10 50 erg.
In the above case, we also expect the afterglow emission from the main jet later. The rise time is months to a year from Eqs. (32) and (33), and the fluxes are potentially ∼ 10-10 4 times brighter than the initially detected fluxes from Eqs. (36) and (37). Therefore, continuous monitoring in radio and X-rays is very important to reveal the jet and outflows from the NS merger.

Expected radio flares and X-ray remnants
The interaction between the merger ejecta and the ISM produces radio flares [90][91][92] and the associated X-ray remnants [93]. Future observations of these signatures can reveal the properties of the jet, merger ejecta, and environment, in particular the ambient density. As we discuss in Sects. 5 and 6.3, there remains degeneracy in the ambient density from n < 10 −5 cm −3 to ∼ 10 −2 cm −3 only with the initial observations of the afterglows. If n < 10 −5 cm −3 , as discussed in Sect. 5, the expected radio and X-ray fluxes are very faint and difficult to detect even at D = 40 Mpc [92,93]. In addition, the peak time is hopelessly long: On the other hand, if the density is moderate n ∼ 10 −2 cm −3 , as discussed in Sect. 6.3, the expected radio and X-ray fluxes are detectable [92,93] and the peak time is also within reach. Therefore, continuous monitoring in radio and X-rays is crucial for revealing the whole picture. 17/25

The jet launch time
The relation β h ∼ 2β e between the jet head velocity and the ejecta velocity at the breakout in Eq. (16) is satisfied if t j ≪ t br . Otherwise, the situation is similar to the breakout from the stellar envelope, and the cocoon velocity and mass are different from Eqs. (23), (24), and (25). Since these Eqs. (23), (24), and (25) are consistent with the observations, our results imply that the jet launch time t j is earlier than t br < ∆T 0 ∼ 2 s, and the delay time ∆T 0 ∼ 2 s of the γ-rays behind the GWs does not represent the jet launch time. This information is important for revealing the jet formation mechanism and could imply that a hypermassive NS formed from two NSs collapses to a BH earlier than ∼ 2 s after the NS merger.

Summary
Prompted by the historical discovery of a binary NS merger in GW170817 [1], we calculate EM signals of an associated jet to reveal its main properties by using multi-wavelength observations. First, we constrain the isotropic-equivalent energy E iso (0) and opening angle ∆θ of the jet by using the γ-ray observations of sGRB 170817A that follows GW170817 after ∼ 1.7 s [2,23,24] in Sect. 2. We carefully calculate the off-axis emission from a top-hat jet in Fig. 2 to give the most robust upper limits on the E iso (0)-∆θ plane in Figs. 3 and 4 (black thick line). We again emphasize that the off-axis emission declines more slowly than the point-source case because of a finite opening angle in Eq. (2), which expands the detectable viewing angles. Second, we examine a possible contribution of the jet energy to the macronova emission, which is blue and very bright at ∼ 1 day and difficult to explain by r-process radioactivity with a canonical ejecta mass M e ∼ 0.01M ⊙ . We follow the jet propagation and breakout from the merger ejecta by deriving improved analytic descriptions in Sect. 3. This gives the injected and released energy from the cocoon to compare with the radioactive energy in Figs. 3 and 4 (red vertical line) and the observed macronova characteristics in Sect. 4. Third, we calculate the afterglow features of the jet to obtain the jet and environment properties from the X-ray and radio observations in Figs. 3 and 4 (magenta curved region) and Sect. 5. Our findings are as follows: (1) A typical sGRB jet viewed off-axis is consistent with the faint sGRB 170817A. In particular, a simple top-hat jet can explain sGRB 170817A with typical isotropic energy E iso (0) ∼ 10 50 -10 52 erg and a viewing angle in Eq. (5)  macronova at ∼ 1 day by r-process radioactivity. If long-lasting jet activity continues after the prompt emission, which is, however, weak and unobservable, it could even dominate the macronova emission because of lower adiabatic cooling. (5) The jet-powered cocoon has favorable mass in Eq. (25) and velocity in Eqs. (23) and (24) for explaining the timescale ∼ 1 day and photospheric velocity ∼ 0.3-0.4c of the blue macronova. According to our improved analytical estimates, the cocoon velocity and mass fraction do not strongly depend on the parameters of the jet and merger ejecta. (6) A typical off-axis jet can reproduce the observed X-ray and radio afterglows by the standard synchrotron shock model. The afterglow rise time in Eq. (32), determined by the deceleration of the jet and the expansion of the beaming angle, can match the discovery times ∼ 9-16 days. The synchrotron fluxes can also fit the observed values. The faint fluxes despite the nearest sGRB with the distance ∼ 40 Mpc observed so far suggest a low ambient density n ∼ 10 −3 -10 −6 cm −3 . (7) The X-ray and radio afterglows could instead originate from mildly relativistic outflows in the merger ejecta or cocoon. In this case, the ambient density can be moderate n ∼ 10 −3 -10 −2 cm −3 , and brighter afterglows of the main jet could arise months to a year later. (8) The radio flares and associated X-ray remnants, caused by the interaction between the merger ejecta and the ISM, are important for diagnosing in particular the undetermined ambient density. (9) There is a parameter space for a typical top-hat jet to explain all the sGRB 170817A, blue macronova, and X-ray and radio afterglows.
A similar GW event with a similar configuration could occur within 5-10 years. This is because the merger rate inferred by GW170817 is at the higher end of the previous limits and estimates, roughly ∼ 2 event yr −1 within ∼ 100 Mpc [1], and the expected typical viewing angle peaks around ∼ 31 • [166,167] with the mean ∼ 38 • [167] by considering that GW signals are stronger along the orbital axis.
Given the merger rate and the ejecta mass per merger, we can see the consistency with the Galactic enrichment rate [168]. If both the quantities are raised, a tension could appear in the total abundance, and also in the r-process cosmic-ray abundance [169]. These are interesting future problems.

Latest observations
During the refereeing process, new observations were reported in radio [172], optical [173], and X-rays [174][175][176][177]. In this final subsection, we apply our discussions and give possible interpretations. The observed power-law spectrum over eight digits of frequency F ν ∝ ν −0.6 suggests synchrotron emission with the index p ∼ 2.2 of the electron distribution where the cooling frequency is above the X-ray band and the synchrotron frequency is below the radio band. The light curves show steady brightening F ν ∝ t 0.7 up to t ∼ 110 days followed by a possible decline [176].
A simple top-hat jet is not consistent with the flux rising over one digit in time. The afterglow of a top-hat jet is thought to rise to the peak faster than F ν ∝ t 0.7 , and fall after 19/25 the peak over a factor of several in time. Then, if the peak is at t ∼ 10 days or t ∼ 110 days, the late or early flux becomes fainter than the observations, respectively.
We can make a jet model consistent with the observations by a slight modification of the jet structure. First, we can easily bring the rise time of the afterglow in Eq. (32) to by using twice the fiducial viewing angle, θ v − ∆θ ∼ 15 • . Note that such a viewing angle is consistent with the off-axis emission model in Eq. (5) by using a slightly small Lorentz factor that does not cause the compactness problem (see Sect. 2.2). We can also fit the peak flux by choosing the parameters. Then we can obtain the early rising F ν ∝ t 0.7 by introducing the polar jet structure, which is energetically minor (see also Ref. [178]). Therefore, the off-axis jet model is currently consistent with the observations and is not yet excluded. Note that the jet structure for the afterglow may not necessarily coincide with the prompt emission structure.
Other models could also explain the steadily rising afterglow. One possibility is the ambient density structure and/or the radial jet structure that leads to energy injection at late time. However, these models generally require a coincidence between the rising timescale due to these structures and the rising timescale due to the viewing angle, and hence are not natural. Nevertheless, this is one of the few observations of sGRB afterglows beyond ∼ 10 days and we cannot exclude these possibilities immediately. Alternatively, as already argued, the merger ejecta itself [69] or the cocoon [130,152]

A. Off-axis emission from a top-hat jet
To calculate the off-axis emission from a top-hat jet, we use the formulation of Ioka & Nakamura [59]. A single pulse of sGRBs is well approximated by instantaneous emission at time t = t 0 and radius r = r 0 from a uniform thin shell with an opening half-angle ∆θ moving radially with a Lorentz factor Γ = 1/(1 − β 2 ) 1/2 . We assume that the emission is optically thin, and isotropic in the comoving frame of the jet. Then we can analytically derive the spectral flux [erg s −1 cm −2 eV −1 ] at the observer time T , frequency ν and viewing angle θ v as where D is the luminosity distance, A 0 is the normalization, is a kind of a Doppler factor, 9 and T 0 = t 0 − r 0 /cβ. The azimuthal angle of the emitting region θ(T ) varies from 0 to θ v + ∆θ for θ v < ∆θ, and from θ v − ∆θ to θ v + ∆θ for θ v > ∆θ. The polar (half-)angle of the emitting region is ∆φ(T ) = π if ∆θ > θ v and 0 < θ(T ) ≤ ∆θ − θ v , otherwise ∆φ(T ) = cos −1 {[cos ∆θ − cos θ(T ) cos θ v ]/[sin θ v sin θ(T )]}. We adopt the broken power-law spectrum in the comoving frame of the jet, which is similar to the Band spectrum of the observed GRBs [170], where α B and β B are the low-and high-energy power-law indexes, respectively, and s describes the smoothness of the transition. We adopt α B = −1, β B = −2.2 [171], and s = 1 in this paper. As we integrate the spectrum below, the choice of the typical frequency ν ′ 0 does not matter so much if it is included in the integral range. The isotropic energy at the viewing angle θ v is calculated as where and we adopt ν min = 10 keV and ν max = 25 MeV in this paper. If the sGRB is composed of multiple pulses, we can add all the isotropic energy. Approximate scaling of the isotropic energy on the viewing angle E iso (θ v ) is obtained from the above equations for Γ −1 ≪ ∆θ. We can perform the frequency integral first, where as long as the spectral peak is included in the frequency integration, we can approximately regard the last term dν ′ f (ν ′ ) as a constant. For the time integration, we may focus on the duration ∆T in which most of the energy is released and perform dT → ∆T . Then we can show that the terms in Eq. (A7) scale as follows: For θ v < ∆θ, ∆T ∼ r 0 /2cβΓ 2 = const., δ(T ) ∼ Γ, ∆φ = π, For ∆θ < θ v 2∆θ, where we define the Doppler factors .
(A10) 9 The definition of δ in Ioka & Nakamura [59] is the inverse of δ in our paper.

21/25
Note thatδ(θ v ) ∼ 2Γ/[1 + Γ 2 (θ v − ∆θ) 2 ] for Γ ≫ 1 and θ v − ∆θ ≪ 1. Note also that, in the above Eq. (A8), the duration ∆T in which most energy is released is ∆T ∼ T start − T 0 , not ∆T ∼ T end − T start , for ∆θ < θ v 2∆θ because the Doppler factor δ(T ) is doubled after ∆T ∼ T start − T 0 is passed. Therefore, the scaling of the isotropic energy on the viewing angle is obtained as Part of the scaling was also derived by Yamazaki et al. [60,106].