2022

[1,2]Alessio Mei

1] Gran Sasso Science Institute, Viale F. Crispi 7, L’Aquila (AQ), I-67100,
Italy

2] INFN - Laboratori Nazionali del Gran Sasso, L’Aquila (AQ), I-67100, Italy

3]Università degli Studi di Milano-Bicocca, piazza dell’Ateneo Nuovo 1, Milano
(MI), I-20126, Italy

3]INFN – Sezione di Milano-Bicocca, Piazza della Scienza 2, Milano (MI),
I-20126, Italy

4] Department of Physics and Astronomy, University of Bologna, via Gobetti
93/2, Bologna, 40129, Italy

5] INAF - Istituto di Radioastronomia, via Gobetti 101, Bologna, 40129, Italy

6] INAF - Osservatorio Astronomico di Brera, via E. Bianchi 46, Merate (LC),
I-23807, Italy

7] Discipline of Astronomy, Astrophysics and Space Engineering, Indian
Institute of Technology Indore, Khandwa Road, Simrol, Indore, 453552, India

# GeV emission from a compact binary merger

<EMAIL_ADDRESS>Biswajit Banerjee  Gor Oganesyan  Om Sharan Salafia
Stefano Giarratana  Marica Branchesi  Paolo D’Avanzo  Sergio Campana
Giancarlo Ghirlanda  Samuele Ronchini  Amit Shukla  Pawan Tiwari  [  [  [  [
[  [  [  [

###### Abstract

An energetic $\rm\gamma$-ray burst (GRB), GRB 211211A, was observed on 2021
December 11 by the Neil Gehrels Swift Observatory. Despite its long duration,
typically associated with bursts produced by the collapse of massive stars,
the discovery of an optical-infrared kilonova and a quasi-periodic oscillation
during a gamma-ray precursor points to a compact object binary merger origin.
The complete understanding of this nearby ($\sim$ 1 billion light-years) burst
will significantly impact our knowledge of GRB progenitors and the physical
processes that lead to electromagnetic emission in compact binary mergers.
Here, we report the discovery of a significant ($\rm>5\sigma$) transient-like
emission in the high-energy $\rm\gamma$-rays (HE; E$>0.1$ GeV) observed by
Fermi/LAT starting at $10^{3}$ s after the burst. After an initial phase with
a roughly constant flux ($\rm\sim 5\times 10^{-10}\ erg\ s^{-1}\ cm^{-2}$)
lasting $\sim 2\times 10^{4}$ s, the flux started decreasing and soon went
undetected. The multi-wavelength ‘afterglow’ emission observed at such late
times is usually in good agreement with synchrotron emission from a
relativistic shock wave that arises as the GRB jet decelerates in the
interstellar medium. However, our detailed modelling of a rich dataset
comprising public and dedicated multi-wavelength observations demonstrates
that GeV emission from GRB 211211A is in excess with respect to the
expectation of this scenario. We explore the possibility that the GeV excess
is inverse Compton emission due to the interaction of a long-lived, low-power
jet with an external source of photons. We discover that the kilonova emission
can provide the necessary seed photons for GeV emission in binary neutron star
mergers.

###### keywords:

high energy astrophysics, gamma-ray burst, compact object coalescence

$\rm\gamma$-ray bursts (GRBs) are extra-galactic transients which release an
enormous amount of (isotropic equivalent) energy, of the order of $\rm
10^{52}-10^{54}$ erg. The initial highly variable $\rm\gamma-$ray radiation
(called ‘prompt emission’) is a short-lived burst ($\rm 0.1-10^{3}$ s) in the
$\rm\gamma$-ray band (10 keV - 10 MeV) originating from internal dissipation
of energy within an ultra-relativistic jet (narayan1992, ; rees1994, ;
sari1996, ). The propagation of the GRB jet into the circum-burst medium
produces a shock wave which gives rise to a multi-wavelength, longer-lived
afterglow emission due to synchrotron radiation from non-thermal electrons
(Paczynski1993, ; Sari1999, ). GRBs are classified into two classes based on
the duration of their prompt emission: ‘long’ (lGRBs, longer than 2 sec) and
‘short’ (sGRBs, shorter than 2 sec) Kouveliotou1993 . Over the last decades,
extensive GRB studies demonstrated that their spectral properties, afterglow
emission and host galaxies are consistent with two types of progenitors
berger2014 . While a number of supernovae (SNe) of the Ib/c class detected in
association with long GRBs woosley2006  revealed massive star collapse
progenitors, the short GRB 170817A detected in close temporal association with
the gravitational wave (GW) signal GW170817 abbott2017A ; abbott2017B ;
Abbott2017C  showed that binary neutron star (BNS) mergers are the progenitors
of short GRBs. A key feature of compact object mergers involving at least one
neutron star is the kilonova, an optical-infrared transient powered by
radioactive decay of unstable heavy isotopes synthetized by rapid neutron
capture by nuclei within the expanding neutron-rich merger ejecta Li1998 ;
Metzger2010 ; Goriely2011 ; Barnes2013 . Signatures of the presence of such an
emission have been observed following several sGRBs Tanvir2013 ; Berger2013 ;
Troja2019 ; Ascenzi2019 ; Jin2020 ; rossi2020 , and the first spectroscopic
confirmation and detailed multi-wavelength characterization came with the
AT2017gfo kilonova after GW170817 abbott2017B ; Pian2017 ; Smartt2017 ;
Drout2017 .

(a) $t_{0}$-1 d to $t_{0}$

(b) $t_{0}$ to $t_{0}$+20 ks

(c) $t_{0}$+1 d to $t_{0}$+2 d

(d) $t_{0}$ to $t_{0}$+2 d

Figure 1: Test Statistic (TS) maps (top panel) centered at the GRB position
(R.A. $=212.272^{\circ}$, Dec. $=27.884^{\circ}$) and the GRB light curve and
spectrum (bottom panel). With respect to the GRB 211211A trigger time $t_{0}$,
the TS maps are shown: (a) one day before $t_{0}$, (b) during the first 6
hours after $t_{0}$, and (c) one day after $t_{0}$. While a significant excess
has been observed within 1-20 ks after the GRB trigger time reaching TS of
$\sim 35$, no significant excess has been observed in any other time-bins. The
bottom panel shows the GRB 211211A light curve between 0.1-1 GeV. Flux upper
limits are shown (in black) for the the epochs with TS$<10$. The two spectra
shown in the bottom-right panel are between 5.7-6.8 ks (blue) and 12.3-13.4 ks
(red).

On December 11, 2021 at 13:09:59 Universal Time (UT) a burst triggered the
Burst Alert Telescope (BAT) on-board the Swift satellite 2021GCN  and the
Gamma-ray Burst Monitor (GBM) on-board the Fermi satellite gbm2021GCN . The
GRB 211211A showed duration and properties typical of long GRBs, but right
after its detection, several outstanding features came into sight. Deep
optical observations revealed that this source is strongly offset with respect
to the center of its host galaxy, placed at redshift $z=0.076$ (350 Mpc)
2021GCN.31221….1M ; Rastinejad2022 . A kilonova emission was discovered in the
optical/NIR band in temporal and spacial coincidence with the burst
Rastinejad2022 . In addition, the $\gamma$-ray precursor anticipating the
prompt emission shows signatures of Quasi-Periodic Oscillations (QPOs,
Xiao2022 ). Despite its long duration as estimated by Swift and Fermi, these
interesting discoveries are pointing towards a compact binary merger
progenitor, strongly challenging the above short/long GRB progenitor dichotomy
and opening a new door to a more complex classification scheme for GRBs.
Here, we report another discovery for the GRB 211211A; the detection, in the
Fermi Large Area Telescope (LAT) data, of a significant ($>5\sigma$) emission
with photon energies between 0.1-1 GeV (Fig. 1). The emission showed up
significantly ($>3\sigma$) about 6 ks after the burst and remained constant
for about other 8 ks. It is characterised by a relatively soft spectrum with
power law photon index of $\rm 2.9\pm 0.4$. We measure a flux of $\rm(5.21\pm
1.52)\times 10^{-10}\ erg\ s^{-1}\ cm^{-2}$ between 0.1 and 1 GeV (integrated
between 1 and 20 ks after the trigger time) which, given the source distance,
corresponds to a luminosity of $\rm(7.4\pm 2.2)\times 10^{45}\ erg\ s^{-1}$,
particularly low compared to GRBs observed so far at similar times and
frequencies by Fermi/LAT ajello2019 , as shown in Fig. 2. This intrinsically
faint emission would be hardly detected at distances larger than 350 Mpc. Such
a late time emission in Fermi/LAT data is not present in any other GRBs closer
than 350 Mpc (see Methods), and it has never been reported for short GRBs at
any distances (Fig. 2). For GW170817, no Fermi/LAT detection was reported on
timescales of minutes, hours, and days after the BNS merger 2018ApJ…861…85A ,
making the GeV emission of GRB 211211A the first ever high energy component
observed in association with a compact binary merger event.

Figure 2: Long (in green) and short (in red) LAT light curves from the 2nd
Fermi/LAT GRB catalog ajello2019  compared to GRB 211211A emission (in blue).
We show the LAT flux in the energy band of 0.1-10 GeV as a function of time
from the burst trigger time ($T_{0}$) obtained through time-resolved analysis
with a test statistic $\rm>10$ (Left panel). For the sub-sample of long and
short GRBs with redshift estimates ($\sim 34$ sources), we show the isotropic-
equivalent LAT luminosity $\rm L_{iso}$ (Right panel) as a function of the
rest-frame time after trigger.

We have followed up GRB 211211A with the High Throughput X-ray Spectroscopy
Mission (XMM-Newton) in soft X-rays (0.3 - 10 keV) 9.6 and 51 days after GRB
trigger time and we have obtained deep upper limits of $\rm
10^{-14}\,erg\,s^{-1}\,cm^{-2}$ and $\rm 5\times
10^{-15}\,erg\,s^{-1}\,cm^{-2}$, respectively. A search for late radio
afterglow emission was performed 35, 39 and 77 days post-burst with the Karl
G. Jansky Very Large Array (VLA) at 3, 6 and 10 GHz frequencies. We did not
detect any emission also at these frequencies. To fully characterize the
afterglow emission of this source, we enriched our dataset with publicly
available data from Swift/XRT, Swift/UVOT, and photometry from ground-based
optical/IR telescopes (see Methods for details). We model radio-to-GeV
observations within the standard afterglow scenario sari1996 , including
synchrotron and synchrotron self-Compton (SSC) radiation from shock-
accelerated circum-burst medium electrons. We also include a simple one-
component model for the kilonova emission (see Methods). The model fit is in
good agreement with the optical and X-ray light curves, including the well
constrained spectral shape of the soft X-ray emission and the very late epoch
upper limits obtained with the VLA and XMM-Newton (Fig. 3).

Figure 3: Light curves (Left-hand Panel) and spectral energy density
distributions (SEDs, Right-hand Panel) of GRB 211211A. In both panels, fluxes
inferred from observations are shown by markers with error bars (or
‘butterflies’ showing flux confidence regions for Swift-XRT and Fermi-LAT in
the right-hand panel), while solid lines show our best-fitting forward shock
plus kilonova model. Dotted lines single out the kilonova contribution. The
SEDs are relative to the time bins marked with vertical grey bands in the
left-hand panel. Error bars and butterflies show one-sigma confidence ranges
(statistical error only).

The best fit parameters of the afterglow suggest that the GRB jet is highly
collimated (aperture angle $\theta_{\mathrm{j}}\sim 1.0_{-0.3}^{+0.5}\,\rm
deg$, 90% credible level) and it propagates in a rarefied circum-burst medium
with a homogeneous number density $n\leq 8\times 10^{-5}\,\rm cm^{-3}$ (95%
credible upper limit), in agreement with what would be expected given the
offset between this GRB and its host galaxy center. The jet’s total kinetic
energy (corrected for collimation) $E_{\rm jet}=1.0^{+6.0}_{-0.9}\times
10^{50}\,\rm erg$ is consistent with the amount of energy disposed in the jet
formed from the BNS merger of GW170817 (e.g. (salafia2021, )).
Despite the good spectral and timing description of the optical and X-ray data
by the combined standard afterglow and the kilonova models, the high-energy
emission component at late times remains in excess with respect to the
standard forward shock radiation. While the first epoch of the Fermi/LAT
observation (4-7 ks) is consistent with the synchrotron component of the
forward shock, the second one (between 12-20 ks) is in clear excess over the
expected power law decay of the afterglow ($\propto t^{-1}$, see Fig. 3, left
panel). Such a late excess could originate from the External Inverse Compton
(EIC) process, that is, from photons produced externally with respect to the
GRB jet that are up-scattered by electrons within the latter. A possible
source of external photons is the kilonova emission. Its thermal emission
spectrum, Comptonized by the jet electrons, would account for the relatively
soft observed GeV spectrum and would not contaminate the soft X-ray which we
model as synchrotron emission. Assuming the kilonova photons to be the seed
photons for the EIC, we conclude that the hot electrons from the forward shock
of the relativistic jet responsible of the multi-wavelength emission cannot
reproduce the observed luminosity of the GeV component, due to the extremely
large size of the forward shock at the relevant times. On the other hand, a
source of hot electrons closer to the kilonova ejecta can account for the EIC
component. We invoke the presence of a low-power jet ejected at late times,
whose electrons are capable of producing the amount of GeV emission without
over-shining the overall multi-wavelength afterglow emission by the
synchrotron radiation. We show that a scenario where such electrons reside
nearby the kilonova photosphere at $t=10^{4}$ s (Fig. 4) can explain the
observed GeV emission by inverse Compton scattering of the kilonova photons
(see Methods for details). GeV emission of $\rm\sim 10^{45}\,ergs^{-1}$ from
up-scattered kilonova photons of $\rm\sim 10^{40}\,erg$ s-1 opens new
perspectives in detecting kilonova emission at high energies and GeV
counterpart of gravitational-wave signal from binary neutron star mergers.

Figure 4: Artistic impression of the scenario explaining the Fermi-LAT
observations of the GRB 211211A. Seeds photons emitted from the kilonova
ejecta (in red and blue) are scattered via inverse Compton by electrons in a
low-power jet (in green) launched at late times. The External Inverse Compton
occurs at a radius close to the kilonova surface. The external forward shock
of the relativistic jet giving rise to multi-wavelength afterglow emission is
shown in yellow.

## Declarations

Acknowledgments We thank Gabriele Ghisellini, Alberto Segreto and Elena
Ambrosi for fruitful discussions. The National Radio Astronomy Observatory is
a facility of the National Science Foundation operated under cooperative
agreement by Associated Universities, Inc. PDA and SC warmly thank Norbel
Schartel for granting XMM-Newton DDT observations. MB and SR acknowledge
financial support from the Italian Ministry of University and Research (MUR,
PRIN 2020 grant 2020KB33TP). MB and GO acknowledge financial support from the
AHEAD2020 project (grant agreement n. 871158). BB and MB acknowledge financial
support from MUR (PRIN 2017 grant 20179ZF5KS). OS thanks MUR grant 2017MB8AEZ
for financial support. PDA and SC acknowledge support from ASI grant
I/004/11/5. This work made use of data supplied by the UK Swift Science Data
Centre at the University of Leicester.

Conflict of interest We declare no conflicts of interest.

## References

  *   * (1) Narayan, R., Paczynski, B. & Piran, T.  Gamma-Ray Bursts as the Death Throes of Massive Binary Stars.  _ApJ_ 395, L83 (1992).  10.1086/186493, arXiv:astro-ph/9204001 [astro-ph].
  * (2) Rees, M. J. & Meszaros, P.  Unsteady Outflow Models for Cosmological Gamma-Ray Bursts.  _ApJ_ 430, L93 (1994).  10.1086/187446, arXiv:astro-ph/9404038 [astro-ph].
  * (3) Sari, R., Narayan, R. & Piran, T.  Cooling Timescales and Temporal Structure of Gamma-Ray Bursts.  _ApJ_ 473, 204 (1996).  10.1086/178136, arXiv:astro-ph/9605005 [astro-ph].
  * (4) Paczynski, B. & Rhoads, J. E.  Radio Transients from Gamma-Ray Bursters.  _ApJ_ 418, L5 (1993).  10.1086/187102, arXiv:astro-ph/9307024 [astro-ph].
  * (5) Sari, R. & Piran, T.  Predictions for the Very Early Afterglow and the Optical Flash.  _ApJ_ 520 (2), 641–649 (1999).  10.1086/307508, arXiv:astro-ph/9901338 [astro-ph].
  * (6) Kouveliotou, C. _et al._ Identification of Two Classes of Gamma-Ray Bursts.  _ApJ_ 413, L101 (1993).  10.1086/186969 .
  * (7) Berger, E.  Short-Duration Gamma-Ray Bursts.  _ARA &A_ 52, 43–105 (2014).  10.1146/annurev-astro-081913-035926, arXiv:1311.2603 [astro-ph.HE].
  * (8) Woosley, S. E. & Bloom, J. S.  The Supernova Gamma-Ray Burst Connection.  _ARA &A_ 44 (1), 507–556 (2006).  10.1146/annurev.astro.43.072103.150558, arXiv:astro-ph/0609142 [astro-ph].
  * (9) Abbott, B. P. _et al._ GW170817: Observation of Gravitational Waves from a Binary Neutron Star Inspiral.  _Phys. Rev. Lett._ 119 (16), 161101 (2017).  10.1103/PhysRevLett.119.161101, arXiv:1710.05832 [gr-qc].
  * (10) Abbott, B. P. _et al._ Multi-messenger Observations of a Binary Neutron Star Merger.  _ApJ_ 848 (2), L12 (2017).  10.3847/2041-8213/aa91c9, arXiv:1710.05833 [astro-ph.HE].
  * (11) Abbott, B. P. _et al._ Gravitational Waves and Gamma-Rays from a Binary Neutron Star Merger: GW170817 and GRB 170817A.  _ApJ_ 848 (2), L13 (2017).  10.3847/2041-8213/aa920c, arXiv:1710.05834 [astro-ph.HE].
  * (12) Li, L.-X. & Paczyński, B.  Transient Events from Neutron Star Mergers.  _ApJ_ 507 (1), L59–L62 (1998).  10.1086/311680, arXiv:astro-ph/9807272 [astro-ph].
  * (13) Metzger, B. D. _et al._ Electromagnetic counterparts of compact object mergers powered by the radioactive decay of r-process nuclei.  _MNRAS_ 406 (4), 2650–2662 (2010).  10.1111/j.1365-2966.2010.16864.x, arXiv:1001.5029 [astro-ph.HE].
  * (14) Goriely, S., Bauswein, A. & Janka, H.-T.  r-process Nucleosynthesis in Dynamically Ejected Matter of Neutron Star Mergers.  _ApJ_ 738 (2), L32 (2011).  10.1088/2041-8205/738/2/L32, arXiv:1107.0899 [astro-ph.SR].
  * (15) Barnes, J. & Kasen, D.  Effect of a High Opacity on the Light Curves of Radioactively Powered Transients from Compact Object Mergers.  _ApJ_ 775 (1), 18 (2013).  10.1088/0004-637X/775/1/18, arXiv:1303.5787 [astro-ph.HE].
  * (16) Tanvir, N. R. _et al._ A ‘kilonova’ associated with the short-duration $\gamma$-ray burst GRB 130603B.  _Nature_ 500 (7464), 547–549 (2013).  10.1038/nature12505, arXiv:1306.4971 [astro-ph.HE].
  * (17) Berger, E., Fong, W. & Chornock, R.  An r-process Kilonova Associated with the Short-hard GRB 130603B.  _ApJ_ 774 (2), L23 (2013).  10.1088/2041-8205/774/2/L23, arXiv:1306.3960 [astro-ph.HE].
  * (18) Troja, E. _et al._ The afterglow and kilonova of the short GRB 160821B.  _MNRAS_ 489 (2), 2104–2116 (2019).  10.1093/mnras/stz2255, arXiv:1905.01290 [astro-ph.HE].
  * (19) Ascenzi, S. _et al._ A luminosity distribution for kilonovae based on short gamma-ray burst afterglows.  _MNRAS_ 486 (1), 672–690 (2019).  10.1093/mnras/stz891, arXiv:1811.05506 [astro-ph.HE].
  * (20) Jin, Z.-P. _et al._ A kilonova associated with GRB 070809.  _Nature Astronomy_ 4, 77–82 (2020).  10.1038/s41550-019-0892-y, arXiv:1901.06269 [astro-ph.HE].
  * (21) Rossi, A. _et al._ A comparison between short GRB afterglows and kilonova AT2017gfo: shedding light on kilonovae properties.  _MNRAS_ 493 (3), 3379–3397 (2020).  10.1093/mnras/staa479, arXiv:1901.05792 [astro-ph.HE].
  * (22) Pian, E. _et al._ Spectroscopic identification of r-process nucleosynthesis in a double neutron-star merger.  _Nature_ 551 (7678), 67–70 (2017).  10.1038/nature24298, arXiv:1710.05858 [astro-ph.HE].
  * (23) Smartt, S. J. _et al._ A kilonova as the electromagnetic counterpart to a gravitational-wave source.  _Nature_ 551 (7678), 75–79 (2017).  10.1038/nature24303, arXiv:1710.05841 [astro-ph.HE].
  * (24) Drout, M. R. _et al._ Light curves of the neutron star merger GW170817/SSS17a: Implications for r-process nucleosynthesis.  _Science_ 358 (6370), 1570–1574 (2017).  10.1126/science.aaq0049, arXiv:1710.05443 [astro-ph.HE].
  * (25) D’Ai, A. _et al._ GRB 211211A: Swift detection of a bright burst.  _GRB Coordinates Network_ 31202, 1 (2021) .
  * (26) Fermi GBM Team.  GRB 211211A: Fermi GBM Final Real-time Localization.  _GRB Coordinates Network_ 31201, 1 (2021) .
  * (27) Malesani, D. B. _et al._ GRB 211211A: NOT optical spectroscopy.  _GRB Coordinates Network_ 31221, 1 (2021) .
  * (28) Rastinejad, J. C. _et al._ A Kilonova Following a Long-Duration Gamma-Ray Burst at 350 Mpc.  _arXiv e-prints_ arXiv:2204.10864 (2022).  arXiv:2204.10864 [astro-ph.HE].
  * (29) Xiao, S. _et al._ The quasi-periodically oscillating precursor of a long gamma-ray burst from a binary neutron star merger.  _arXiv e-prints_ arXiv:2205.02186 (2022).  arXiv:2205.02186 [astro-ph.HE].
  * (30) Ajello, M. _et al._ A Decade of Gamma-Ray Bursts Observed by Fermi-LAT: The Second GRB Catalog.  _ApJ_ 878 (1), 52 (2019).  10.3847/1538-4357/ab1d4e, arXiv:1906.11403 [astro-ph.HE].
  * (31) Ajello, M. _et al._ Fermi-LAT Observations of LIGO/Virgo Event GW170817.  _ApJ_ 861 (2), 85 (2018).  10.3847/1538-4357/aac515 .
  * (32) Salafia, O. S. & Giacomazzo, B.  Accretion-to-jet energy conversion efficiency in GW170817.  _A &A_ 645, A93 (2021).  10.1051/0004-6361/202038590, arXiv:2006.07376 [astro-ph.HE].
  * (33) Evans, P. A. _et al._ Methods and results of an automatic analysis of a complete sample of Swift-XRT observations of GRBs.  _MNRAS_ 397 (3), 1177–1201 (2009).  10.1111/j.1365-2966.2009.14913.x, arXiv:0812.3662 [astro-ph].
  * (34) Kalberla, P. M. W. _et al._ The Leiden/Argentine/Bonn (LAB) Survey of Galactic HI. Final data release of the combined LDS and IAR surveys with improved stray-radiation corrections.  _A &A_ 440 (2), 775–782 (2005).  10.1051/0004-6361:20041864, arXiv:astro-ph/0504140 [astro-ph].
  * (35) Belles, A., D’Ai, A. & Swift/UVOT Team.  GRB 211211A: Swift/UVOT detection.  _GRB Coordinates Network_ 31222, 1 (2021) .
  * (36) Schlafly, E. F. & Finkbeiner, D. P.  Measuring Reddening with Sloan Digital Sky Survey Stellar Spectra and Recalibrating SFD.  _ApJ_ 737 (2), 103 (2011).  10.1088/0004-637X/737/2/103, arXiv:1012.4804 [astro-ph.GA].
  * (37) Jiang, S. Q. _et al._ GRB 211211A: Nanshan/NEXT optical observations.  _GRB Coordinates Network_ 31213, 1 (2021) .
  * (38) Malesani, D. B. _et al._ GRB 211211A: NOT optical spectroscopy.  _GRB Coordinates Network_ 31221, 1 (2021) .
  * (39) Ito, N. _et al._ GRB 211211A: MITSuME Akeno optical observation.  _GRB Coordinates Network_ 31217, 1 (2021) .
  * (40) Kumar, H. _et al._ GRB 211211A: HCT and GIT optical follow up observations.  _GRB Coordinates Network_ 31227, 1 (2021) .
  * (41) Strausbaugh, R. & Cucchiara, A.  GRB 211211A: LCO Optical Observations.  _GRB Coordinates Network_ 31214, 1 (2021) .
  * (42) Gupta, R. _et al._ GRB 211211A: observations with the 3.6m Devasthal Optical Telescope.  _GRB Coordinates Network_ 31299, 1 (2021) .
  * (43) Moskvitin, A. _et al._ GRB 211211A: SAO RAS optical observations.  _GRB Coordinates Network_ 31234, 1 (2021) .
  * (44) de Ugarte Postigo, A. _et al._ GRB 211211A: Afterglow detection from CAFOS/2.2m CAHA.  _GRB Coordinates Network_ 31218, 1 (2021) .
  * (45) de Ugarte Postigo, A. _et al._ GRB 211211A: Further observations from CAFOS/2.2m CAHA.  _GRB Coordinates Network_ 31228, 1 (2021) .
  * (46) Levan, A. J. _et al._ GRB 211211A - Gemini K-band detection.  _GRB Coordinates Network_ 31235, 1 (2021) .
  * (47) Zheng, W., Filippenko, A. V. & KAIT GRB Team.  GRB 211211A: KAIT Optical Afterglow Candidate.  _GRB Coordinates Network_ 31203, 1 (2021) .
  * (48) Li, W., Filippenko, A. V., Chornock, R. & Jha, S.  The Katzman Automatic Imaging Telescope Gamma-Ray Burst Alert System, and Observations of GRB 020813.  _PASP_ 115 (809), 844–853 (2003).  10.1086/376432, arXiv:astro-ph/0305027 [astro-ph].
  * (49) McMullin, J. P., Waters, B., Schiebel, D., Young, W. & Golap, K.  Shaw, R. A., Hill, F. & Bell, D. J. (eds) _CASA Architecture and Applications_.  (eds Shaw, R. A., Hill, F. & Bell, D. J.) _Astronomical Data Analysis Software and Systems XVI_ , Vol. 376 of _Astronomical Society of the Pacific Conference Series_ , 127 (2007).
  * (50) Ackermann, M. _et al._ The First Fermi-LAT Catalog of Sources above 10 GeV.  _ApJS_ 209 (2), 34 (2013).  10.1088/0067-0049/209/2/34, arXiv:1306.6772 [astro-ph.IM].
  * (51) Abdollahi, S. _et al._ Fermi Large Area Telescope Fourth Source Catalog.  _ApJS_ 247 (1), 33 (2020).  10.3847/1538-4365/ab6bcb, arXiv:1902.10045 [astro-ph.HE].
  * (52) Ajello, M. _et al._ A Decade of Gamma-Ray Bursts Observed by Fermi-LAT: The Second GRB Catalog.  _ApJ_ 878 (1), 52 (2019).  10.3847/1538-4357/ab1d4e, arXiv:1906.11403 [astro-ph.HE].
  * (53) Abdalla, H. _et al._ A very-high-energy component deep in the $\gamma$-ray burst afterglow.  _Nature_ 575 (7783), 464–467 (2019).  10.1038/s41586-019-1743-9, arXiv:1911.08961 [astro-ph.HE].
  * (54) Ajello, M. _et al._ Fermi Large Area Telescope Performance after 10 Years of Operation.  _ApJS_ 256 (1), 12 (2021).  10.3847/1538-4365/ac0ceb, arXiv:2106.12203 [astro-ph.IM].
  * (55) Massaro, F. _et al._ The gamma-ray blazar quest: new optical spectra, state of art and future perspectives.  _Ap &SS_ 361 (10), 337 (2016).  10.1007/s10509-016-2926-6, arXiv:1609.09502 [astro-ph.HE].
  * (56) Fermi-LAT collaboration _et al._ Incremental Fermi Large Area Telescope Fourth Source Catalog.  _arXiv e-prints_ arXiv:2201.11184 (2022).  arXiv:2201.11184 [astro-ph.HE].
  * (57) MichałowskI, M. J. _et al._ The second-closest gamma-ray burst: sub-luminous GRB 111005A with no supernova in a super-solar metallicity environment.  _A &A_ 616, A169 (2018).  10.1051/0004-6361/201629942, arXiv:1610.06928 [astro-ph.HE].
  * (58) Ackermann, M. _et al._ Fermi Observations of GRB 090510: A Short-Hard Gamma-ray Burst with an Additional, Hard Power-law Component from 10 keV TO GeV Energies.  _ApJ_ 716 (2), 1178–1190 (2010).  10.1088/0004-637X/716/2/1178, arXiv:1005.2141 [astro-ph.HE].
  * (59) Kumar, P. & Zhang, B.  The physics of gamma-ray bursts & relativistic jets.  _Phys. Rep._ 561, 1–109 (2015).  10.1016/j.physrep.2014.09.008, arXiv:1410.0679 [astro-ph.HE].
  * (60) Sari, R., Piran, T. & Narayan, R.  Spectra and Light Curves of Gamma-Ray Burst Afterglows.  _ApJ_ 497 (1), L17–L20 (1998).  10.1086/311269, arXiv:astro-ph/9712005 [astro-ph].
  * (61) Panaitescu, A. & Kumar, P.  Analytic Light Curves of Gamma-Ray Burst Afterglows: Homogeneous versus Wind External Media.  _ApJ_ 543 (1), 66–76 (2000).  10.1086/317090, arXiv:astro-ph/0003246 [astro-ph].
  * (62) Salafia, O. S. _et al._ Multi-wavelength view of the close-by GRB 190829A sheds light on gamma-ray burst physics.  _ApJ (in press)_ arXiv:2106.07169 (2022).  arXiv:2106.07169 [astro-ph.HE].
  * (63) Granot, J. & Piran, T.  On the lateral expansion of gamma-ray burst jets.  _MNRAS_ 421 (1), 570–587 (2012).  10.1111/j.1365-2966.2011.20335.x, arXiv:1109.6468 [astro-ph.HE].
  * (64) Hotokezaka, K. _et al._ Mass ejection from the merger of binary neutron stars.  _Phys. Rev. D_ 87 (2), 024001 (2013).  10.1103/PhysRevD.87.024001, arXiv:1212.0905 [astro-ph.HE].
  * (65) Radice, D. _et al._ Binary Neutron Star Mergers: Mass Ejection, Electromagnetic Counterparts, and Nucleosynthesis.  _ApJ_ 869 (2), 130 (2018).  10.3847/1538-4357/aaf054, arXiv:1809.11161 [astro-ph.HE].
  * (66) Nedora, V. _et al._ Spiral-wave Wind for the Blue Kilonova.  _ApJ_ 886 (2), L30 (2019).  10.3847/2041-8213/ab5794, arXiv:1907.04872 [astro-ph.HE].
  * (67) Just, O., Bauswein, A., Ardevol Pulpillo, R., Goriely, S. & Janka, H. T.  Comprehensive nucleosynthesis analysis for ejecta of compact binary mergers.  _MNRAS_ 448 (1), 541–567 (2015).  10.1093/mnras/stv009, arXiv:1406.2687 [astro-ph.SR].
  * (68) Siegel, D. M. & Metzger, B. D.  Three-dimensional GRMHD Simulations of Neutrino-cooled Accretion Disks from Neutron Star Mergers.  _ApJ_ 858 (1), 52 (2018).  10.3847/1538-4357/aabaec, arXiv:1711.00868 [astro-ph.HE].
  * (69) Lippuner, J. & Roberts, L. F.  r-process Lanthanide Production and Heating Rates in Kilonovae.  _ApJ_ 815 (2), 82 (2015).  10.1088/0004-637X/815/2/82, arXiv:1508.03133 [astro-ph.HE].
  * (70) Kasen, D., Badnell, N. R. & Barnes, J.  Opacities and Spectra of the r-process Ejecta from Neutron Star Mergers.  _ApJ_ 774 (1), 25 (2013).  10.1088/0004-637X/774/1/25, arXiv:1303.5788 [astro-ph.HE].
  * (71) Korobkin, O., Rosswog, S., Arcones, A. & Winteler, C.  On the astrophysical robustness of the neutron star merger r-process.  _MNRAS_ 426 (3), 1940–1949 (2012).  10.1111/j.1365-2966.2012.21859.x, arXiv:1206.2379 [astro-ph.SR].
  * (72) Metzger, B. D.  Kilonovae.  _Living Reviews in Relativity_ 23 (1), 1 (2019).  10.1007/s41114-019-0024-0, arXiv:1910.01617 [astro-ph.HE].
  * (73) Grossman, D., Korobkin, O., Rosswog, S. & Piran, T.  The long-term evolution of neutron star merger remnants - II. Radioactively powered transients.  _MNRAS_ 439 (1), 757–770 (2014).  10.1093/mnras/stt2503, arXiv:1307.2943 [astro-ph.HE].
  * (74) Wollaeger, R. T. _et al._ Impact of ejecta morphology and composition on the electromagnetic signatures of neutron star mergers.  _MNRAS_ 478 (3), 3298–3334 (2018).  10.1093/mnras/sty1018, arXiv:1705.07084 [astro-ph.HE].
  * (75) Ciolfi, R. & Kalinani, J. V.  Magnetically Driven Baryon Winds from Binary Neutron Star Merger Remnants and the Blue Kilonova of 2017 August.  _ApJ_ 900 (2), L35 (2020).  10.3847/2041-8213/abb240, arXiv:2004.11298 [astro-ph.HE].
  * (76) Fernández, R., Foucart, F. & Lippuner, J.  The landscape of disc outflows from black hole-neutron star mergers.  _MNRAS_ 497 (3), 3221–3233 (2020).  10.1093/mnras/staa2209, arXiv:2005.14208 [astro-ph.HE].
  * (77) Foreman-Mackey, D., Hogg, D. W., Lang, D. & Goodman, J.  emcee: The MCMC Hammer.  _PASP_ 125 (925), 306 (2013).  10.1086/670067, arXiv:1202.3665 [astro-ph.IM].
  * (78) Spitkovsky, A.  Particle Acceleration in Relativistic Collisionless Shocks: Fermi Process at Last?  _ApJ_ 682 (1), L5 (2008).  10.1086/590248, arXiv:0802.3216 [astro-ph].
  * (79) Dermer, C. D. & Schlickeiser, R.  Model for the High-Energy Emission from Blazars.  _ApJ_ 416, 458 (1993).  10.1086/173251 .
  * (80) Beloborodov, A. M.  Optical and GeV-TeV Flashes from Gamma-Ray Bursts.  _ApJ_ 618 (1), L13–L16 (2005).  10.1086/427627, arXiv:astro-ph/0410050 [astro-ph].
  * (81) Fan, Y. Z., Zhang, B. & Wei, D. M.  Early Photon-Shock Interaction in a Stellar Wind: A Sub-GeV Photon Flash and High-Energy Neutrino Emission from Long Gamma-Ray Bursts.  _ApJ_ 629 (1), 334–340 (2005).  10.1086/431473, arXiv:astro-ph/0504039 [astro-ph].
  * (82) Murase, K., Toma, K., Yamazaki, R., Nagataki, S. & Ioka, K.  High-energy emission as a test of the prior emission model for gamma-ray burst afterglows.  _MNRAS_ 402 (1), L54–L58 (2010).  10.1111/j.1745-3933.2009.00799.x, arXiv:0910.0232 [astro-ph.HE].
  * (83) Murase, K., Toma, K., Yamazaki, R. & Mészáros, P.  On the Implications of Late Internal Dissipation for Shallow-decay Afterglow Emission and Associated High-energy Gamma-ray Signals.  _ApJ_ 732 (2), 77 (2011).  10.1088/0004-637X/732/2/77, arXiv:1011.0988 [astro-ph.HE].
  * (84) Wang, X.-Y., Li, Z. & Mészáros, P.  GeV-TeV and X-Ray Flares from Gamma-Ray Bursts.  _ApJ_ 641 (2), L89–L92 (2006).  10.1086/504151, arXiv:astro-ph/0601229 [astro-ph].
  * (85) Fan, Y.-Z., Piran, T., Narayan, R. & Wei, D.-M.  High-energy afterglow emission from gamma-ray bursts.  _MNRAS_ 384 (4), 1483–1501 (2008).  10.1111/j.1365-2966.2007.12765.x, arXiv:0704.2063 [astro-ph].
  * (86) Zhang, B. T., Murase, K., Veres, P. & Mészáros, P.  External Inverse-Compton Emission from Low-luminosity Gamma-Ray Bursts: Application to GRB 190829A.  _ApJ_ 920 (1), 55 (2021).  10.3847/1538-4357/ac0cfc, arXiv:2012.07796 [astro-ph.HE].
  * (87) Murase, K. _et al._ Double Neutron Star Mergers and Short Gamma-ray Bursts: Long-lasting High-energy Signatures and Remnant Dichotomy.  _ApJ_ 854 (1), 60 (2018).  10.3847/1538-4357/aaa48a, arXiv:1710.10757 [astro-ph.HE].
  * (88) Fan, Y. & Piran, T.  Sub-GeV flashes in $\gamma$-ray burst afterglows as probes of underlying bright far-ultraviolet flares.  _MNRAS_ 370 (1), L24–L28 (2006).  10.1111/j.1745-3933.2006.00181.x, arXiv:astro-ph/0601619 [astro-ph].
  * (89) Zhang, H., Christie, I. M., Petropoulou, M., Rueda-Becerril, J. M. & Giannios, D.  Inverse Compton signatures of gamma-ray burst afterglows.  _MNRAS_ 496 (1), 974–986 (2020).  10.1093/mnras/staa1583, arXiv:1910.14049 [astro-ph.HE].
  * (90) Toma, K., Wu, X.-F. & Mészáros, P.  An Up-Scattered Cocoon Emission Model of Gamma-Ray Burst High-Energy Lags.  _ApJ_ 707 (2), 1404–1416 (2009).  10.1088/0004-637X/707/2/1404, arXiv:0905.1697 [astro-ph.HE].
  * (91) Kumar, P. & Smoot, G. F.  Some implications of inverse-Compton scattering of hot cocoon radiation by relativistic jets in gamma-ray bursts.  _MNRAS_ 445 (1), 528–543 (2014).  10.1093/mnras/stu1638, arXiv:1402.2656 [astro-ph.HE].
  * (92) De Colle, F., Lu, W., Kumar, P., Ramirez-Ruiz, E. & Smoot, G.  Thermal and non-thermal emission from the cocoon of a gamma-ray burst jet.  _MNRAS_ 478 (4), 4553–4564 (2018).  10.1093/mnras/sty1282, arXiv:1701.05198 [astro-ph.HE].
  * (93) Kimura, S. S. _et al._ Upscattered Cocoon Emission in Short Gamma-Ray Bursts as High-energy Gamma-Ray Counterparts to Gravitational Waves.  _ApJ_ 887 (1), L16 (2019).  10.3847/2041-8213/ab59e1, arXiv:1910.13277 [astro-ph.HE].
  * (94) Burrows, D. N. _et al._ Bright X-ray Flares in Gamma-Ray Burst Afterglows.  _Science_ 309 (5742), 1833–1835 (2005).  10.1126/science.1116168, arXiv:astro-ph/0506130 [astro-ph].
  * (95) Falcone, A. D. _et al._ The Giant X-Ray Flare of GRB 050502B: Evidence for Late-Time Internal Engine Activity.  _ApJ_ 641 (2), 1010–1017 (2006).  10.1086/500655, arXiv:astro-ph/0512615 [astro-ph].
  * (96) Chincarini, G. _et al._ The First Survey of X-Ray Flares from Gamma-Ray Bursts Observed by Swift: Temporal Properties and Morphology.  _ApJ_ 671 (2), 1903–1920 (2007).  10.1086/521591, arXiv:astro-ph/0702371 [astro-ph].
  * (97) Nousek, J. A. _et al._ Evidence for a Canonical Gamma-Ray Burst Afterglow Light Curve in the Swift XRT Data.  _ApJ_ 642 (1), 389–400 (2006).  10.1086/500724, arXiv:astro-ph/0508332 [astro-ph].
  * (98) Liang, E.-W., Zhang, B.-B. & Zhang, B.  A Comprehensive Analysis of Swift XRT Data. II. Diverse Physical Origins of the Shallow Decay Segment.  _ApJ_ 670 (1), 565–583 (2007).  10.1086/521870, arXiv:0705.1373 [astro-ph].
  * (99) Zhang, B. _et al._ Physical Processes Shaping Gamma-Ray Burst X-Ray Afterglow Light Curves: Theoretical Implications from the Swift X-Ray Telescope Observations.  _ApJ_ 642 (1), 354–370 (2006).  10.1086/500723, arXiv:astro-ph/0508321 [astro-ph].
  * (100) Ghisellini, G., Ghirlanda, G., Nava, L. & Firmani, C.  “Late Prompt” Emission in Gamma-Ray Bursts?  _ApJ_ 658 (2), L75–L78 (2007).  10.1086/515570, arXiv:astro-ph/0701430 [astro-ph].
  * (101) Dai, Z. G. & Lu, T.  Gamma-ray burst afterglows and evolution of postburst fireballs with energy injection from strongly magnetic millisecond pulsars.  _A &A_ 333, L87–L90 (1998).  arXiv:astro-ph/9810402 [astro-ph].
  * (102) Zhang, B. & Mészáros, P.  Gamma-Ray Burst Afterglow with Continuous Energy Injection: Signature of a Highly Magnetized Millisecond Pulsar.  _ApJ_ 552 (1), L35–L38 (2001).  10.1086/320255, arXiv:astro-ph/0011133 [astro-ph].
  * (103) Rosswog, S.  Fallback accretion in the aftermath of a compact binary merger.  _MNRAS_ 376 (1), L48–L51 (2007).  10.1111/j.1745-3933.2007.00284.x, arXiv:astro-ph/0611440 [astro-ph].
  * (104) Begelman, M. C. & Sikora, M.  Inverse Compton Scattering of Ambient Radiation by a Cold Relativistic Jet: A Source of Beamed, Polarized X-Ray and Optical Observations of X-Ray–selected BL Lacertae Objects.  _ApJ_ 322, 650 (1987).  10.1086/165760 .
  * (105) Sikora, M., Begelman, M. C. & Rees, M. J.  Comptonization of Diffuse Ambient Radiation by a Relativistic Jet: The Source of Gamma Rays from Blazars?  _ApJ_ 421, 153 (1994).  10.1086/173633 .
  * (106) Yang, J. _et al._ A peculiar, long-duration gamma-ray burst from a neutron star-white dwarf merger.  _arXiv e-prints_ arXiv:2204.12771 (2022).  arXiv:2204.12771 [astro-ph.HE].
  * (107) Ryan, G., van Eerten, H., Piro, L. & Troja, E.  Gamma-Ray Burst Afterglows in the Multimessenger Era: Numerical Models and Closure Relations.  _ApJ_ 896 (2), 166 (2020).  10.3847/1538-4357/ab93cf, arXiv:1909.11691 [astro-ph.HE].

## Methods

Swift/XRT We have downloaded the data provided by the X-Ray Telescope (0.3 -
10 keV, XRT) on-board the Neil Gehrels Swift Observatory (Swift) from the
Swift Science Data Center supported by the University of Leicester (Evans2009,
). Eight time-bins (3.5 - $140$ ks from the GRB trigger time) in the Photon
Counting mode were selected for the time-resolved spectral analysis to
evaluate the temporal and spectral evolution of the X-ray emission during the
afterglow phase. We have performed spectral analysis of XRT time-resolved
spectra with XSPEC (v12.12.0) using the CSTAT likelihood. We have fitted the
0.3 - 10 keV spectra by a simple power law taking into account the Galactic
absorption by applying the multiplicative tbabs model. Galactic absorption by
neutral hydrogen in the direction of the GRB is estimated from Kalberla2005 .
We have additionally fitted all the time-resolved spectra by applying also
ztbabs model to account for the intrinsic absorption. We have found the
intrinsic column density of the neutral hydrogen being consistent with zero.
Therefore, we have further excluded the intrinsic absorption from our
modelling. The best fit parameters, i.e. unabsorbed flux and the photon index
were used for the modeling of the afterglow emission.

Swift/UVOT The Swift/UVOT carried out observations of GRB 211211A between $\rm
T_{0}+92$ s and $\rm T_{0}+3.3$ d. The GRB optical and UV afterglow has been
detected in all UVOT filters until $\rm T_{0}+1.3$ d UVOT_GCN_Circular ;
Rastinejad2022 . We retrieved and analysed the Swift/UVOT data obtained with
the white filter from the Swift archive 111https://heasarc.gsfc.nasa.gov/cgi-
bin/W3Browse/swift.pl. The afterglow magnitudes have been obtained with the
task uvotsource, part of the HEASoft software
package222https://heasarc.gsfc.nasa.gov/docs/software/heasoft/, using a
circular extraction aperture of $3^{\prime\prime}$ radius (in order to
minimise contamination from the nearby host galaxy) and a background circular
region of $20^{\prime\prime}$ radius. An aperture correction has been applied
to report the obtained magnitudes to the standard $5^{\prime\prime}$ aperture.
For the afterglow light curves in the other UVOT filters we refer to the
magnitudes values reported in Rastinejad2022 .
While we did not include, as a conservative choice, the white filter data in
the model fitting, we estimated a posteriori its compatibility with our
modelling as follows. Using the appropriate transmission
curve333https://www.mssl.ucl.ac.uk/www_astro/uvot/uvot_instrument/ we found
that, assuming a spectrum with an intrinsic power law flux density $\rm
F_{\nu}\propto\nu^{-0.65}$ (corresponding to the spectral shape predicted by
our model) and accounting for Galactic interstellar dust absorption with
$E(B-V)=0.015$ (Schlafly2011, ), the extinction-corrected white filter AB
magnitude can be transformed into the equivalent $u$-filter one by a $+0.068$
magnitude correction. The earliest $u$-filter data point in Figure 3, obtained
in this way, is in excellent agreement with the model prediction and it shows
that the optical afterglow flux density was most likely rising at times
$t\lesssim 5000\,\mathrm{s}$.

XMM-Newton We obtained two epochs of observations of the field of GRB 211211A
with XMM-Newton at mid-times of $\sim 9.6$ and $\sim 50.9$ days after the
burst, lasting 40 and 67 ks (EPIC/pn exposure), respectively. We relied on
data products released through the Processing Pipeline Subsystem (PPS), with
standard filtering for the background flares, resulting in 12.7 and 38.3 ks
effective exposure time, respectively. Fully consistent results were obtained
from an independent custom reduction carried out with the XMM-Newton Science
Analysis Software (SAS). No clear X-ray source is detected at the afterglow
position. From the resulting EPIC/pn images we derive $3\sigma$ upper limits
of $\sim 3.6\times 10^{-3}$ and $\sim 1.5\times 10^{-3}$ cts s-1 for the first
and second epoch, respectively. Assuming the spectral parameters derived by
Swift/XRT444https://www.swift.ac.uk/xrt_spectra/01088940/, i.e. Galactic $\rm
N_{H}=1.76\times 10^{20}$ cm-2 and photon index $\Gamma=1.5$, these values
translate into unabsorbed flux limits of $\sim 1.1\times 10^{-14}$ and $\sim
4.8\times 10^{-15}$ erg s-1 cm-2in the 0.3 - 10 keV energy range.
However, we report that running a targeted search at the GRB afterglow
position on the first epoch of EPIC/pn data through the Sosta (SOurce
STAtistcs) tool555part of the HEASoft/Ximage software a possible excess is
detected with a count rate of $(3.2\pm 1.0)\times 10^{-3}$ cts s-1. Assuming
the above spectral parameters, this translates into an unabsorbed 0.3-10 keV
flux of $(1.02\pm 0.32)\times 10^{-14}$ erg s-1 cm-2 . However, given the low-
significance, it is not possible to assess if this excess is due to a real
source or just to a spurious fluctuation. Considering this data point as an
upper limit or a detection has no consequences for the conclusions of this
paper.

Telescopio Nazionale Galileo (TNG) Near-infrared (NIR) observations of GRB
211211A were carried out with the Italian 3.6-m TNG telescope, sited in Canary
Island, using the NICS instrument in imaging mode. A series of images were
obtained with the H filter on 2021-12-16 from 05:51:36 UT to 07:00:51 UT (i.e.
at a mid time of about 4.7 days after the burst). The image reduction was
carried out using the jitter task of the ESO-eclipse
package666https://www.eso.org/sci/software/eclipse/. Astrometry was performed
using the 2MASS777https://irsa.ipac.caltech.edu/Missions/2mass.html catalogue.
No source is detected at the optical and NIR counterpart position down to a
$3\sigma$ upper limit of H $>20.5$ mag (Vega) or H $>21.9$ mag (AB).

Optical/NIR data GRB 211211A has been followed-up by numerous optical
telescopes. We have selected observations in several bands (AB system) from
the GCN Circulars Archive for the afterglow modelling. We include in our
analysis r-band data from the NEXT-0.6m optical telescope (GCN.31213, ),
Nordic Optical Telescope (NOT, GCN.31221 ), MITSuME (GCN.31217, ), Himalayan
Chandra Telescope (HCT, GCN.31227 ), LCO 1-m Sinistro instrument (GCN.31214,
), Devasthal Optical Telescope (GCN.31299, ), Zeiss-1000 telescope of SAO RAS
(GCN.31234, ); i-band data from CAFOS/2.2m CAHA (GCN.31218, ; GCN.31228, ),
MITSuME (GCN.31217, ) and k-band data from Gemini-North Telescope (GCN.31235,
). We show in Fig. 3 (green star at $\rm\sim 4000s$) also the r-band flux
density derived by converting a KAIT white filter observationGCN.31203
following Ref.Li2003_KAIT , but we conservatively do not include it in the
modelling.

Very Large Array Observations with the Karl G. Jansky Very Large Array (VLA)
were performed 35 (January 15, 2022), 39 (January 19, 2022) and 77 (February
26, 2022) days post-burst (PI: Giarratana; project code: 21B-370) at the
central frequencies of 3 (S-band), 6 (C-band) and 10 GHz (X-band), with a
bandwidth of 2, 4 and 4 GHz, respectively. The distance between the target and
the phase calibrator (J1407$+$2827) is about 0.7∘. Each observation started
with scans of the flux and bandpass calibrator (J1331$+$3030). The data were
calibrated using the custom casa pipeline (Version 6.2.1, McMullin2007 ) and
visually inspected for possible radio frequency interference. The final images
were produced with the tclean task in casa (Version 5.1.0.). We did not detect
any point-like transient consistent with the Swift/XRT position of the burst.

Fermi/LAT The Large Area Telescope (LAT) on board Fermi is sensitive to the
gamma-ray photons in the energy band 0.1-300 GeV (2013ApJS..209…34A, ). We use
gtburst tool to extract and analyse the data. We define a region of interest
(ROI) of 12∘ centred at the burst position (R.A. $=212.272^{\circ}$, Dec.
$=27.884^{\circ}$) provided by Swift/BAT. We initially perform a standard LAT
unbinned likelihood analysis. The null hypothesis is given by the baseline
likelihood model which includes the isotropic particle background (isotr.
template in gtburst), galactic and extra-galactic high energy components from
the Fermi 4th Catalog (4FGL, 2020ApJS..247…33A ) with fixed normalisation
(template (fixed norm.)). If a new source is present in the field of view
(FoV), its addition to the model should describe the observed data better,
given a certain position and spectral model. To assess if the improvement is
significant, we use the Likelihood Ratio Test (LRT), as described in
2019ApJ…878…52A . For each time-bin, the LRT returns best-fit spectral values,
as well as the relative test statistic ${\rm
TS}=-2\times\ln\left(L_{\mathrm{max,0}}/L_{\mathrm{max,1}}\right)$, where
$L_{\rm max,0}$ is the maximum likelihood for the null hypothesis (background
only), and Lmax,1 is the maximum likelihood for a model with the additional
source at a given location and with a given spectral shape. In this analysis,
we use the GRB position estimated by Swift/BAT and a power law spectral model
(powerlaw2 using gtburst).
The spectral parameters are only reported when the test statistic (TS) is
larger than 10 in a given time-bin. The choice of the time-bins is driven by
the visibility of the source in the FoV of the telescope satisfying the
condition of zenith-angle below 100∘ and angular distance ($\theta$) from the
center of the LAT FoV less than $60^{\circ}$. The values of zenith angle of
100∘ is chosen in order to minimise the effect of the Earth occultation.
We find only two time-bins, 5715-6795 s and 12342-13452 s after the trigger
time ($\rm t_{0}=660921004\,s$ Mission Elapsed Time - MET) with $\rm TS>10$,
while in the other time bins we obtain $\rm TS<10$, resulting in flux upper
limits.
We re-bin the LAT data, in order to match the temporal bins covered by
Swift/XRT. We select five epochs: 0.90-1.34 ks, 4-7 ks, 12-20 ks, 20-110 ks,
110-610 ks. We find that $\rm TS>10$ only between 4-7 ks and 12-20 ks, with TS
of 11 and 24 corresponding to $\sim 3\sigma$ and $\sim 5\sigma$ detections,
respectively. For the first epoch, we estimate a flux $F_{\rm LAT,1}=(5.28\pm
2.61)\times 10^{-10}\ \rm erg\ s^{-1}\ cm^{-2}$ (0.1-1 GeV) and photon index
$\Gamma_{\rm LAT,1}=-3.12\pm 0.77$, while for the second epoch $F_{\rm
LAT,2}=(4.59\pm 1.72)\times 10^{-10}\rm erg\ s^{-1}\ cm^{-2}$ and photon index
$\Gamma_{\rm LAT,2}=-2.82\pm 0.48$ (see Fig. 1). We detected 9 photons from
the GRB during the first 20 ks of observation with probability of association
with the GRB (p; estimated with gtsrcprob and P8R3_TRANSIENT010E_V2 as
instrument response function) larger than 0.9. The standard criteria for
detecting a GRB according to 2019ApJ…878…52A  is to have more than 3 photons
with p$>$0.9. The highest energy photon has been detected at 13 ks (at a
position 0.32∘ away from the GRB location and with an associated probability
p=0.97). This photon has an energy of 1.74 GeV. The properties of the photons,
such as energy, GRB association probability, distance from the source and the
arrival time from the trigger time are reported in Table 1.

Energy (GeV) | Probability | Distance (deg.) | Arrival time (sec.)
---|---|---|---
0.21 | 0.94 | 0.36 | 6438.18
0.19 | 0.95 | 1.04 | 6647.43
0.16 | 0.93 | 1.34 | 12493.41
0.12 | 0.96 | 0.71 | 12612.52
1.74 | 0.97 | 0.32 | 12966.74
0.10 | 0.96 | 0.77 | 13053.43
0.12 | 0.92 | 1.69 | 13292.13
0.29 | 0.91 | 1.22 | 17860.45
0.23 | 0.97 | 0.67 | 18127.51
Table 1: The energy of the photons, probability of association to the GRB,
distance from the GRB location (as respect to RA=212.272∘, DEC=27.884∘) and
the arrival time of the photons from the trigger time with probability more
than 0.9.

Finding the location of the GeV excess We test the presence of a GeV source
with the help of a test statistics map (TS map). In TS map, we divide the ROI
(12∘ around the GRB position) in several pixels with a side of 0.8∘. We
perform the same LAT likelihood analysis described in the previous section. We
fix all spectral parameters, including the Galactic and isotropic diffuse
emission templates (abdalla2019, ), except for the normalization factor of the
spectra, which are left free to vary. The analysis returns a test statistic
value for each pixel, assessing which are the positions in the ROI where the
detected emission is coming from.
We applied this strategy to three time-bins: one day before, one day after and
the day of the GRB 211211A trigger. Since this analysis explores a longer time
duration than 100 s, the event class P8R3_TRANSIENT010E_V2 is used as
mentioned in 2019ApJ…878…52A . We performed a LRT by considering the time
intervals only when the border of the ROI is at a zenith angle less than 100∘,
which reduces the contamination from the Earth limb.
We show the results in Fig. 1. We obtain a maximum $\rm TS\simeq 35$ in the TS
map made during the first 20 ks after the burst, resulting in a $>5\sigma$
detection, in spacial coincidence with the GRB, hence confirming the existence
of the GeV source. Conversely, in the day before and after the burst, the
maximum TS does not reach 10 in coincidence with the burst position.

Ruling out external high energy contamination The ROI of GRB 211211A includes
5 sources within $5^{\circ}$ from the burst location: 4FGL J1410.4+2820, 4FGL
J1417.9+2543, 4FGL J1424.1+2917, 4FGL J1351.9+2847, and 4FGL J1350.8+3033,
with distances 0.55∘, 2.93∘, 3.59∘, 3.87∘, and 4.79∘, respectively. Among
these sources, 4FGL J1410.4+2820 is located at a distance of $0.5^{\circ}$,
which is smaller than the LAT point spread function $68\%$ containment angle
($\sim 1^{\circ}$ at 1 GeV (ajello2021, )). This source is associated with RX
J1410.4+2821 (R.A. $=212.623^{\circ}$, Dec. $=28.342^{\circ}$), a BL Lacertae
object (BL Lac, massaro2016 ). In order to rule out the possibility that the
GeV photons detected at the location of the GRB are associated with a flaring
state of the BL Lac object and estimate the possible contamination in our
detection by the BL Lac flux, we analyzed the data of the BL Lac object 4FGL
J1410.4+2820 using the enrico tools. We selected P8R3_SOURCE_V2 as the
response function. We used events from 0.1 - 300 GeV selected within a 10∘ ROI
centered at 4FGL J1410.4+2820 and having a zenith distance below 100∘ to avoid
contamination from the Earth’s limb. The diffuse Galactic and isotropic
components were modelled with the files gll_iem_v07.fits and
iso_P8R3_SOURCE_V2.txt, respectively. We included the point sources in the
4FGL located in the 10∘ ROI and an additional surrounding 5∘-wide annulus. The
spectral slopes were fixed to their 4FGL values, while the normalization of
the sources within the ROI as well as the diffuse components are kept free to
vary. We analyzed monthly-binned data of the BL Lac object before the trigger
time of the GRB (658293004-660921004 s MET) and after (661007404-663635404 s
MET) excluding one day around the GRB burst (660921004-661007404 s MET).

Figure 5: Time-averaged broadband spectrum of 4FGL J1410.4+2820. The two
arrows represent the upper limits for the BL Lac flux obtained using one month
of observation by Fermi/LAT before and after the GRB (in yellow and purple,
respectively). The green band in the GeV energies represent the time-averaged
GeV emission from 12 years of observation (2022arXiv220111184F, ). The
emission from the blazar is at least two order of magnitude weaker than the
emission from the GRB.

The spectral analysis of the BL Lac for one month before and after the trigger
returns upper limits of values $\rm 7\times 10^{-13}\ erg\ s^{-1}\ cm^{-2}$
and $\rm 2\times 10^{-12}\ erg\ s^{-1}\ cm^{-2}$, respectively. These upper
limits are $\sim 2$ orders of magnitude smaller than the flux obtained from
the LAT excess in temporal coincidence with the GRB. We also included the
time-averaged broadband spectrum of the BL Lac in 12 years of
observation888https://fermi.gsfc.nasa.gov/ssc/data/access/lat/12yr_catalog
(see Fig. 5, 2022arXiv220111184F ) which is consistent with the flux upper
limits derived from the monthly-binned data from the BL Lac object.

Search for similar GeV component in nearby GRBs Four GRBs closer than 350 Mpc
have been detected by Swift/BAT and Fermi/GBM so far: GRB 111005A, GRB
100316D, GRB 171205A, and GRB 190829A with redshift of 0.013, 0.059, 0.037,
and 0.078, respectively. The GRB 100316D, GRB 171205A, and GRB 190829A are
typical long GRBs with associated SNe observed. The LAT data analysis for
these three GRBs shows no detection from the source within one day from the
trigger time. The corresponding upper limits are the following: 1.15$\times
10^{-10}$ erg s-1cm-2 , 1.35$\times 10^{-10}$ erg s-1cm-2 and 1.38$\times
10^{-10}$ erg s-1cm-2 , respectively. GRB 111005A is a long type GRB
2018A&A…616A.169M  without an associated SN. The Fermi/LAT observations for
this GRB also result in flux upper limits of 7.9$\times 10^{-10}$ erg s-1cm-2
, 9$\times 10^{-10}$ erg s-1cm-2 , 1.8$\times 10^{-10}$ erg s-1cm-2 ,
1.78$\times 10^{-10}$ erg s-1cm-2 and 1.74$\times 10^{-10}$ erg s-1cm-2 for
the five consecutive days after the trigger (t0 = 339494716.22 MET). The sGRB
170817A, associated with the BNS merger event GW170817, was not detected by
LAT during the Gravitational Wave trigger as the telescope was transiting
through the South Atlantic Anomaly, preventing to put constraints on the high
energy component. No detection is also reported at later time
(2018ApJ…861…85A, ). The LAT observations in the period between 1153-2027 s
after the GW trigger result in a upper limit of 4.5$\times 10^{-10}$ erg
s-1cm-2 in the 0.1 - 1 GeV range (2018ApJ…861…85A, ). Taking into account the
closer distance of sGRB 170817A, the flux of GRB 211211A is slightly below
this upper limit, but the jet of sGRB 170817A was not aligned to the line of
sight as for GRB 211211A, and an emission similar to the GRB 211211A LAT
detection would have been also fainter.

Comparisons with other LAT emissions from GRBs The first sGRB detected by
Fermi/LAT, GRB 090510 (redshift=0.9; 2010ApJ…716.1178A, ), was observed in the
GeV band during the first 1000 s of observation and then the emission fades
away with no detectable emission at later time (after 1 ks).
GRBs emitting high energy radiation detected by Fermi/LAT are collected in the
second Fermi/LAT GRB Catalog (2FLGC, ajello2019 ). The catalog contains $\sim
200$ sources starting from Fermi launch up to the end of 2018, for a total of
ten years. We compare the GRB 211211A with the populations of long and short
GRBs in the catalog. Our classification of long or short bursts is based on
the $\rm T_{90}$ estimate provided by Fermi/GBM. We consider only emissions
that reach a test statistics $\rm TS>10$ in the time-resolved analysis
performed in ajello2019 .
By comparing the fluxes in the 0.1-10 GeV energy band (Fig. 2, left panel) we
note that GRB 211211A observations lie in the tail of light curves of the long
GRB population. If we consider the isotropic-equivalent LAT luminosity $\rm
L_{iso}$ (Fig. 2, right panel) for a sub-sample of GRBs with redshift
measurements, we observe that this emission is significantly fainter with
respect to both short and long populations. This suggests that the LAT
emission of GRB 211211A is intrinsically fainter, and it would be hardly
detectable for sources placed at larger distances (i.e. $>$ 350 Mpc).
In Fig. 6 (left panel) we compare the prompt duration of the burst $\rm
T_{90}$ with the time at which LAT started to detect HE emission from the GRB.
The GRB 211211A occupies the upper-right corner of the plot, together with
other long GRBs showing LAT late-time emission. In Fig. 6 (right panel), we
compare flux in the energy range 0.1 - 10 GeV and spectral index obtained
through a time-integrated analysis along all the LAT duration. We observe that
GRB 211211A occupies a region of the plot relatively far from the clustered
region occupied by long GRBs and the sparse distribution of short GRBs.

Figure 6: Long (in green) and short (in red) bursts emissions from the 2nd
Fermi/LAT GRB catalog ajello2019  compared to GRB 211211A (in blue).
We show the LAT detection time from the burst versus the GRB duration $\rm
T_{90}$ (left panel) computed with Fermi/GBM data The dashed lines separates
the GRB which are detected during (below) or after (above) the prompt
emission. Note that in some cases, including GRB 211211A, the Fermi/LAT
observation started after the prompt phase, and we cannot exclude an emission
starting before the detection time shown in the plot. In the right panel we
show LAT photon index versus LAT flux (0.1 - 10 GeV), both obtained through
time-integrated analysis in ajello2019 .

Forward shock model The GRB emission is thought to be produced within a
collimated, relativistic outflow (i.e. a jet) that moves in a direction close
to the line of sight (e.g. Kumar2015, ). As the jet expands into the
interstellar medium (ISM) at above the local sound speed, a forward shock (FS)
forms and propagates in the ISM (e.g. Sari1998, ; Panaitescu2000, ). We model
the dynamics and emission of the FS, assuming the line of sight to be on the
jet axis and the ISM to be homogeneous with number density $n$, following
Salafia2022_GRB190829A , with the only minor difference that we model the
lateral expansion of the shocked region following the recipe from Granot2012
instead of assuming sound-speed expansion as in Salafia2022_GRB190829A . While
the difference in the light curves obtained with the two methods is very
small, we found the sound-speed model to produce slight discontinuities in the
derivative of some light curves, which we believe is an artifact. The emission
model includes both synchrotron and synchrotron-self-Compton (SSC) from
electrons accelerated at the FS, but we find that, for our best-fit
parameters, the SSC contribution is negligible in the relevant bands. In the
model, a fraction $\chi_{\mathrm{e}}$ of the ISM electrons that cross the
shock is assumed to be accelerated to relativistic speeds. Accelerated
electrons are assumed to be injected into the shocked fluid with a Lorentz
factor $\gamma$ distribution $\mathrm{d}n/\mathrm{d}\gamma\propto\gamma^{-p}$
for $\gamma\geq\gamma_{\mathrm{m}}$, to hold a fraction
$\epsilon_{\mathrm{e}}$ of the shocked fluid energy density and to be subject
to cooling due to synchrotron and SSC emission (the cooling due to the latter
is computed including Klein-Nishina effects). Small-scale turbulence is
assumed to produce an effectively isotropic magnetic field which holds a
constant fraction $\epsilon_{\mathrm{B}}$ of the shocked fluid energy density.
The model is entirely determined by 8 parameters, namely the jet isotropic-
equivalent kinetic energy $E$, its bulk Lorentz factor $\Gamma$ and half-
opening angle $\theta_{\mathrm{j}}$, the ISM number density $n$, and the
‘microphysical’ parameters $\epsilon_{\mathrm{e}}$, $\epsilon_{\mathrm{B}}$,
$\chi_{\mathrm{e}}$ and $p$.

Kilonova model During and after the merger of a binary of two compact objects
including at least one neutron star (NS), outflows of neutron-rich material
can be produced by a variety of mechanisms. Ejecta that remain cold (i.e. are
not heated by shocks) and do not receive intense neutrino irradiation retain
an extremely low proton fraction
$Y_{\mathrm{e}}=n_{\mathrm{p}}/(n_{\mathrm{n}}+n_{\mathrm{p}})\lesssim 0.05$
(e.g. Hotokezaka2013 , where $n_{\mathrm{p}}$ and $n_{\mathrm{n}}$ are the
number densities of protons and neutrons, respectively). Tidal forces
(especially acting on the least massive component of the binary) can unbind
cold material, mainly along the orbital plane and over ms timescales, with
high speeds ($0.1-0.3$ c), potentially large masses (up to 0.1 M${}_{\odot})$,
and low $Y_{\mathrm{e}}$ (Hotokezaka2013, ; Radice2018, ); in the case of a
binary NS (BNS) merger, shocks at the colliding surfaces of the two NS can
eject low amounts ($\lesssim 10^{-3}$ M⊙) of comparably high-speed material,
with high $Y_{\mathrm{e}}$, preferentially along the polar direction; again in
the BNS case, if the merger does not lead to a prompt collapse to a black hole
(BH), violent oscillations and/or bar modes in the immediate post-merger
remnant can produce copious mass ejection (few$\times 10^{-2}$ M⊙) of
neutrino-irradiated material with relatively high $Y_{\mathrm{e}}$ nedora2019
; last, but not least, winds driven by neutrino energy deposition (leading to
high $Y_{\mathrm{e}}$) and more prominently by viscous angular momentum
transport (leading to a broad range of $Y_{\mathrm{e}}$ values) in the
accretion disk around the merger remnant can unbind a large fraction ($\sim
10-30\%$) of the disk mass, with relatively low speeds $\lesssim 0.1$ (e.g.
Just2015, ; Siegel2018, ).
During the first stages of expansion, nucleosynthesis by rapid neutron capture
(r-process) takes place within these outflows. If $Y_{\mathrm{e}}$ is
sufficiently low (about $Y_{\mathrm{e}}\lesssim 0.2$, e.g. Lippuner2015 )
heavy r-process elements (Lanthanides and Actinides) can be produced. Their
complex valence electron structure results in an extremely high opacity to
photons in the infrared-to-ultraviolet wavelength range (Kasen2013, ). As a
result, outflows that start off with $Y_{\mathrm{e}}\lesssim 0.2$ are expected
to have extremely high opacities $\kappa\gtrsim 10\,\mathrm{cm^{2}\,g^{-1}}$
and thus long diffusion times. Lanthanide-free outflows (those initially with
$Y_{\mathrm{e}}\gtrsim 0.2$) are instead expected to have lower opacities
$0.5\lesssim\kappa/\mathrm{cm^{2}\,g^{-1}}\lesssim 3$. Regardless of the
presence of Lanthanides, the radioactive decay (mainly beta) of unstable
isotopes in these outflows is thought to constitute a heating source for the
ejecta with a robust heating rate that depends very weakly on the exact
composition (Korobkin2012, ). Such heating is the power source of the so-
called ‘kilonova’ (KN) emission that is produced as these outflows expand
(Li1998, ; Metzger2019, ).
In the modelling behind this work, we did not attempt at capturing the
complexity of the kilonova emission in presence of several outflows with
different masses, speeds, opacities and geometries, given the insufficient
detail in the available data. We instead opted for adopting the simple, semi-
analytical, one-component, isotropic model from grossman2014 . This model is
entirely specified by three parameters, namely the ejecta mass
$m_{\mathrm{ej}}$, maximum speed $v_{\mathrm{max,ej}}$ and constant grey
opacity $\kappa$.
The inferred kilonova ejecta mass is $m_{\mathrm{ej}}=2.0_{-0.6}^{+0.9}\times
10^{-2}\,\rm M_{\odot}$, expanding with an average velocity of
$v_{\mathrm{ej}}\sim 0.5\ v_{\mathrm{max,ej}}=0.10_{-0.04}^{+0.07}\ c$
grossman2014 ; Wollaeger2018  and with a relatively low opacity
$\kappa=0.6_{-0.3}^{+0.8}\,\rm cm^{2}\ g^{-1}$. These properties are
compatible with winds from a hyper-massive proto-neutron star remnant (HMNS,
(ciolfi2020, )). Alternatively, such ejecta properties are in general
agreement with those expected from material ejected due to enhanced angular
momentum transport in the highly rotating, oblate remnant due to the formation
of spiral arms (the ’spiral wave wind’ described in nedora2019 ). Both
interpretations favour the hypothesis that the merger remnant passed through a
HMNS phase before collapsing. A black hole-neutron star scenario seems less
favoured with respect to BNS merger, especially due to the velocity of the
low-opacity component which, in a black-hole neutron star merger, would have
to be produced in the form of winds from the accretion disk around the merger
remnant, but with a substantially lower expected velocity $v_{\mathrm{ej}}\sim
0.03-0.06\,c$ fernandez2020 ).

Model fitting

We fit our 11-parameter model (8 parameters for the FS and 3 for the KN) to
the available light curve data as follows. Let us define our observations as a
set of flux densities $\\{F_{nu,i}\\}_{i=1}^{N_{\mathrm{F_{\nu}}}}$ measured
at radio, near-infrared, optical and ultraviolet frequencies at times $t_{i}$,
and a set of fluxes and photon indices $\\{F_{i},\alpha_{i}\\}_{i=1}^{N_{F}}$
measured in X- and $\gamma$-rays. Each flux density measurement contributes an
additive term to our log-likelihood, which reads, in the case of detections,

$\log\mathcal{L}_{F_{\nu},i}=-\frac{1}{2}\frac{(F_{\mathrm{\nu,m,i}}(t_{i})-F_{\mathrm{\nu,i}})^{2}}{\sigma_{i}^{2}}-\frac{1}{2}\ln\left(2\pi\sigma_{i}^{2}\right),$
(1)

where $F_{\mathrm{\nu,m,i}}(t_{i})$ is the flux density predicted by the model
at the corresponding time and frequency, and
$\sigma_{i}=\sqrt{\sigma_{\mathrm{obs},i}^{2}+f_{\mathrm{sys}}^{2}F_{\mathrm{\nu,m,i}}^{2}}$
is the assumed uncertainty, which is the sum square of the formal uncertainty
$\sigma_{\mathrm{obs},i}$ associated to the observation and an unknown
systematic contribution to the error, parametrized by the dimensionless
constant $f_{\mathrm{sys}}$ (which therefore constitutes an additional model
parameter). The normalization term (the second term on the right-hand side of
Eq. 1) is included as it effectively represents a penalty for higher values of
$f_{\mathrm{sys}}$. In the case of upper limits, our log-likelihood term
becomes a simple one-sided Gaussian penalty, namely

$\log\mathcal{L}_{\mathrm{UL},i}=-\frac{1}{2}\frac{\left\\{\max\left[(F_{\mathrm{\nu,m,i}}(t_{i})-F_{\mathrm{\nu,i}}),0\right]\right\\}^{2}}{(0.01F_{\mathrm{\nu,i}})^{2}}.$
(2)

For X and $\gamma$-ray fluxes, the additive term is

$\log\mathcal{L}_{F,i}=-\frac{1}{2}\frac{(F_{\mathrm{m,i}}(t_{i})-F_{\mathrm{i}})^{2}}{\sigma_{i}^{2}}-\frac{1}{2}\ln\left(2\pi\sigma_{i}^{2}\right)-\frac{1}{2}\frac{(\alpha_{\mathrm{m,i}}(t_{i})-\alpha_{\mathrm{i}})^{2}}{\sigma_{\alpha,i}^{2}},$
(3)

where again
$\sigma_{i}=\sqrt{\sigma_{\mathrm{obs},i}^{2}+f_{\mathrm{sys}}^{2}F_{\mathrm{m,i}}^{2}}$
as for the flux densities, $\sigma_{\alpha,i}$ is the uncertainty on the
observed photon index (we assume no systematic uncertainty on the photon
index), and the model photon index $\alpha_{\mathrm{m,i}}$ is simply defined
as the average of the slope of the model photon spectrum over the instrument
band.
Adopting log-uniform priors on all parameters except $p$ (for which we use a
uniform prior), within the bounds given in Table 2, we sampled the posterior
probability density with a Markov Chain Monte Carlo (MCMC) approach using the
emcee python package (ForemanMackey2013, ), employing
$N_{\mathrm{walk}}=4\times N_{\mathrm{dim}}=48$ walkers (where
$N_{\mathrm{dim}}=12$ is the dimension of the parameter space). We initialized
the walkers in a small $N_{\mathrm{dim}}$-dimensional ball around a point in
our parameter space representing “standard” GRB afterglow parameters,
$x=(52.5,0,2,-1,-1,-3,0,2.1,-2,0,-1,-1)$ where $x$ represents the parameters
as listed in Table 2, and we performed $N_{\mathrm{iter}}=10000$ iterations,
for a total of $N_{\mathrm{iter}}\times N_{\mathrm{walk}}=480000$ samples. The
final mean auto-correlation time is $\sim 600$, and the posterior looks
reasonably smooth and single-peaked. As a cross-check, we also run several
shorter ($N_{\mathrm{iter}}\sim 2000$) chains with different starting
parameters, and these all converged to the same parameter space region after a
burn in. A corner plot demonstrating the features of our posterior is shown in
Figure 7, while summary information on the parameter credible ranges from the
marginalised posteriors is reported in Table 2. Most parameters are relatively
well constrained, except for the ISM density, whose posterior rails against
the prior bound and it can therefore be only constrained to be
$n/\mathrm{cm^{-3}}<10^{-4.1}$ ($95\%$ credible level, consistent with the
large offset from the host galaxy and the absence of local absorption), and
the fraction of accelerated electrons, that can only be constrained to be
$\chi_{\mathrm{e}}<0.3$ ($95\%$ credible level, in agreement with expectations
from particle-in-cell simulations, e.g. Spitkovsky2008 ).

Table 2: Parameters of our forward shock + kilonova model, summary results
from our MCMC analysis, and bounds of the adopted priors.

Parameter | Posteriora | Prior bounds
---|---|---
$\log(E/\mathrm{erg})$ | $53.2^{+0.8}_{-1.0}$ | $(50,55)$
$\log(n/\mathrm{cm^{-3}})$ | $<-4.2$ | $(-6,2)$
$\log(\Gamma_{0})$ | $3.1^{+0.9}_{-0.6}$ | $(1,4)$
$\log(\theta_{j}/\mathrm{rad})$ | $-1.74^{+0.18}_{-0.19}$ | $(-2,0)$
$\log\epsilon_{\mathrm{e}}$ | $-1.6^{+1.0}_{-0.67}$ | $(-3,-0.3)$
$\log\epsilon_{\mathrm{B}}$ | $-2.5^{+1.1}_{-1.0}$ | $(-7,-0.3)$
$\log\chi_{\mathrm{e}}$ | $<-0.52$ | $(-2,0)$
$p$ | $2.31^{+0.14}_{-0.10}$ | $(2.01,2.99)$
$\log(m_{\mathrm{ej}}/\mathrm{M_{\odot}})$ | $-1.7^{+0.17}_{-0.17}$ | $(-4,0)$
$\log(\kappa/\mathrm{cm^{2}\,g^{-1}})$ | $-0.21^{+0.36}_{-0.31}$ | $(-1,2)$
$\log(v_{\mathrm{max,ej}}/c)$ | $-0.71^{+0.25}_{-0.24}$ | $(-2,-0.2)$
$\log(f_{\mathrm{sys}})$ | $-0.77^{+0.20}_{-0.21}$ | $(-5,0)$

aBest fit value (median of posterior samples) and 90% credible range (or 95%
credible upper limit) constructed from marginalised posterior.

Figure 7: Corner plot demonstrating the properties of the 12-dimensional
posterior obtained from our MCMC sampling. The meaning of the parameters is
explained in the text. The histograms on the diagonal show the one-dimensional
marginalised posterior probability density for each parameter, with the red
line showing the best fit and the dashed lines bracketing 90% (or 95% in case
of upper limits) credible ranges. Contours in the remaining two-dimensional
plots show the one, two and three-sigma equivalent bounds of the joint
posteriors of parameter pairs, while dots show qualitatively the distribution
of posterior samples outside the three-sigma boundaries. The red lines and
dots show the position of the best fit.

External Inverse Compton To explain the high energy (100 MeV - 1 GeV) excess
at $\rm 10^{4}$ s found for GRB 211211A with respect to the standard
synchrotron and SSC model of the afterglow, we invoke emission by External
Inverse Compton (EIC). EIC scattering of soft seed photons by hot electrons in
relativistic jets has been considered for a long time to explain the high
energy emission in blazars Dermer1993 . Signatures of the EIC cooling of
electrons in the GRB afterglow phase have been proposed by different authors.
Prompt emission photons can be Comptonised in the reverse Beloborodov2005  and
forward shock Fan2005  of the blast wave. The EIC radiation from upscattered
prompt emission murase2010 ; murase2011 , X-ray Wang2006a ; fan2008 ;
Zhang2021b ; murase2018  or UV flares Fan2006 , a dense ambient infrared
photon field Zhang2020 , by the forward shock accelerated electrons can give a
rise of the GeV radiation. The photons from the supernova shock break out
Wang2006a  or cocoon Toma2009 ; Kumar2014 ; DeColle2018 ; Kimura2019  are also
considered as seed photons for the EIC in the forward shock site or in the
internal dissipation site, including also late-time dissipation related to the
X-ray plateau emission.

Given that the Fermi/LAT spectrum is soft and the afterglow spectrum at lower
energies (X–ray) is rising in $\nu F_{\nu}$ (see Fig. 3 right panel), the EIC
spectral component should be preferably narrow, favouring thermal seed
photons. As late as $\rm 10^{4}$ s after the GRB, the rise of the kilonova
makes its photons the natural and viable candidate seed photon source.
We first consider EIC scattering of the kilonova photons by hot electrons
produced in the forward shock. To do so, we estimate the size
$R_{\mathrm{FS}}$, bulk Lorentz factor $\Gamma_{\mathrm{FS}}$ and the typical
electron Lorentz factor $\gamma_{\mathrm{m,FS}}$ at the forward shock, at time
$T$ after the GRB, using the parameters close to the best fit parameters of
the afterglow model:

$\Gamma_{\mathrm{FS}}=58\,E_{53}^{1/8}\ n_{-4}^{-1/8}\ T_{4}^{-3/8},$ (4)
$R_{\mathrm{FS}}=4\times 10^{18}\,E_{53}^{1/4}\ n_{-4}^{-1/4}\
T_{4}^{1/4}\,\rm cm,$ (5) $\gamma_{\mathrm{m,FS}}=8\times
10^{3}\,\epsilon_{\mathrm{e,-1.5}}\ \chi_{\mathrm{e,-1}}^{-1}\ E_{53}^{1/8}\
n_{-4}^{-1/8}\ T_{4}^{-3/8},$ (6)

where $Q_{x}$ stands for $Q/10^{x}$ in cgs units, $Q$ being any of the model
parameters.
Given the large radius of the forward shock, most of the seed photons are
received from behind, therefore the seed photons energy density in the
comoving frame of the forward shock region can be approximated as

$U_{\mathrm{seed}}^{\prime}=\frac{L_{\mathrm{seed}}}{4\pi
R_{\mathrm{FS}}^{2}\Gamma_{\mathrm{FS}}^{2}c}.$ (7)

The Lorentz factor of electrons cooling via the EIC on a dynamical time scale
of $R_{\mathrm{FS}}/\Gamma_{\mathrm{FS}}c$ is

$\gamma_{\rm c,EIC}=\frac{3\pi m_{\rm
e}c^{3}R_{\mathrm{F}S}\Gamma_{\mathrm{FS}}^{3}}{\sigma_{\rm T}L_{\rm
seed}}\approx 10^{13}E_{53}^{5/8}\ n_{-4}^{-5/8}\ T_{4}^{-7/8}$ (8)

clearly indicating that efficient extraction of energy from forward shock
accelerated electrons through the EIC process is impossible: the kilonova
luminosity of $\rm L_{KN}\approx 10^{40}\,erg/s$ is too low to account for the
observed $\sim$100 MeV component with $L\rm\sim 5\times 10^{45}\,erg/s$. If
there were any other source of NIR/optical seed photons with the required
luminosity, at $\rm 10^{4}$ s, it would overshine the observed optical
afterglow emission. Therefore, to account for the high energy emission by the
EIC, we need to invoke a source of hot electrons at much smaller radii.
As a heuristic explanation, we assume a low power jet to be present at the
relevant late times (see Fig. 4). This is not novel in GRBs: many long and
short GRBs are followed by late-time X-ray flares Burrows2005 ; Falcone2006 ;
Chincarini2007  and plateau emission Nousek2006 ; Liang2007 . These emission
components are widely thought Zhang2006 ; Ghisellini2007  to be linked to
late-time internal dissipation in a long-lived jet, which in compact binary
mergers can be produced either by a highly-magnetised and fast-spinning proto-
magnetar remnant Dai1998 ; Zhang2001  or by fallback accretion Rosswog2007 .
We therefore assume the presence of a source of hot electrons in the jet,
which we call the ‘dissipation site’, in the vicinity of the kilonova ejecta.
In this scenario, we can constrain the parameters of the dissipation site by
the following requirements: (1) the seed photons for the EIC scattering are
the KN photons, (2) the dissipation in the low-power jet should not over-shine
the observed optical and the X-ray afterglow emission by its synchrotron and
SSC radiation.
We assume the dissipation site to lie at a similar radius as the kilonova
photosphere $R_{\mathrm{j}}\sim R_{\mathrm{KN}}\sim 6\times
10^{13}\,v_{\mathrm{max,ej,-0.7}}\ T_{4}\,\rm cm$. Even in such a
configuration, most of the seed photons from the kilonova reach the
dissipation site from angles larger than $\pi/2$ with respect to the jet local
fluid velocity and are thus de-beamed as seen from the jet comoving frame.
This implies that the electrons that dominate the EIC must have a typical
Lorentz factor $\gamma_{e}=\approx 2\times 10^{3}$, assuming seed photons of
the kilonova to lie in the $r$-band and the peak of the EIC component to be at
100 MeV. Let the jet luminosity be $L_{\mathrm{j}}$ and the bulk Lorentz
factor be $\Gamma_{\mathrm{j}}$, and let $\chi_{e}$ be the fraction of jet
electrons to be accelerated at the dissipation site, with a minimum Lorentz
factor of $\gamma_{\mathrm{m}}$ and an energy distribution
$\mathrm{d}N_{e}/\mathrm{d}\gamma\propto\gamma^{-p}$. The Lorentz factor of
electrons that cool via the EIC on a dynamical time-scale of
$R_{\mathrm{j}}/c\Gamma_{\mathrm{j}}$ is

$\gamma_{\rm c,EIC}=\frac{3\pi m_{\rm
e}c^{3}R_{\mathrm{j}}\Gamma_{\mathrm{j}}^{3}}{\sigma_{\rm T}L_{\rm
seed}}\approx 9\times 10^{4}\ R_{\mathrm{j},13.8}\
\Gamma_{\mathrm{j},0.5}^{3}L_{\mathrm{seed,40.5}},$ (9)

where we have normalized $L_{\rm seed}$ to the kilonova luminosity from our
model, $L_{\rm KN}\sim 3\times 10^{40}\ \rm erg/s$ at $t=10^{4}$ s. Assuming
EIC to be the dominant cooling process (which implies a low magnetic field, as
we detail later in this section), the EIC spectrum peak, in the $\nu F_{\nu}$
representation, is produced by electrons at $\max(\gamma_{\rm m},\gamma_{\rm
c,EIC})$. It is quite reasonable to assume the injected electrons to have
$\gamma_{\rm m}<\gamma_{\rm c,EIC}$. By requiring the peak of the EIC to be at
100 MeV, we get an estimate for $\Gamma_{\mathrm{j}}\approx
3\,L_{\mathrm{seed,40.5}}^{1/3}R_{\rm
j,13.8}^{-1/3}((\nu_{\mathrm{EIC}}/\nu_{\mathrm{seed}})/10^{8})^{1/6}$. The
observed luminosity is dominated by the electrons that cool at
$R_{\mathrm{j}}/c\Gamma_{\mathrm{j}}$, i.e.

$L_{\rm EIC}\sim\tau_{\mathrm{T}}\left(\frac{\gamma_{\rm c}}{\gamma_{\rm
m}}\right)^{3-p}\gamma_{\rm m}^{2}L_{\rm seed},$ (10)

where $\tau_{\mathrm{T}}$ is the Thomson optical depth at the dissipation
site, which can be estimated as

$\tau_{\mathrm{T}}\sim\frac{\sigma_{\mathrm{T}}L_{\mathrm{j}}\chi_{\mathrm{e}}}{4\pi
Rm_{\rm p}c^{3}\Gamma_{\mathrm{j}}^{3}}.$ (11)

This returns $L_{\rm EIC}\sim 10^{45}\ L_{\mathrm{seed,40.5}}^{p-2}L_{\rm
j,47}\ \chi_{\rm e,-1}\gamma_{\rm m,3}^{p-1}\ R_{\rm j,13.8}^{2-p}\
\Gamma_{\rm j,0.5}^{6-3p}\ \rm erg/s$, where the numerical values hereon are
given for $p=2.5$. If we assume the electrons at the dissipation site to be
accelerated by internal shocks with a Lorentz factor contrast $\sim\Gamma$,
then the fraction of internal energy carried by the accelerated electrons in
the shock downstream is $\epsilon_{e}\approx 0.08\ \gamma_{\rm m,3}\ \chi_{\rm
e,-1}\ /(\Gamma_{\rm j,0.5}-1)$. To estimate the total energy loss of
electrons via EIC, SSC and synchrotron radiation, let us write the sum of the
energy densities of external seed kilonova photons, synchrotron photons and
the magnetic field:

$U_{\rm seed}^{\prime}+U_{\rm syn}^{\prime}+U_{\rm B}^{\prime}=U_{\rm
seed}^{\prime}\left[1+\frac{U_{\rm B}^{\prime}}{U_{\rm
seed}^{\prime}}\left(1+\frac{L_{\rm j}\sigma_{\rm T}\chi_{\rm e}\gamma_{\rm
m}^{2}}{3\pi m_{\rm p}c^{3}R\Gamma^{3}}\right)\right].$ (12)

To avoid the cooling to be dominated by synchrotron and SSC, the condition

$U_{\rm seed}^{\prime}>\frac{U_{\rm B}^{\prime}}{1+\frac{L_{\rm j}\sigma_{\rm
T}\chi_{\rm e}\gamma_{\rm m}^{2}}{3\pi m_{\rm
p}c^{3}R\Gamma^{3}}}\sim\frac{3\pi m_{\rm
p}c^{3}R\Gamma^{3}U^{\prime}_{\mathrm{B}}}{L_{\rm j}\sigma_{\rm T}\chi_{\rm
e}\gamma_{\rm m}^{2}}$ (13)

must be satisfied (which also ensures that these emission components have
negligible luminosity with respect to the FS). For our parameters, this
implies $B^{\prime}<0.04\
L_{\mathrm{seed,40.5}}^{1/2}R_{\mathrm{j},13.8}^{-1/2}\Gamma_{\mathrm{j},0.5}^{1/2}L_{\mathrm{j,47}}^{-1/2}\chi_{\mathrm{e,-1}}^{-1/2}\gamma_{\mathrm{m,3}}^{-1}\
\rm G$, corresponding to an extremely low magnetisation in the dissipation
region, $L_{\rm B}/L_{\rm j}\approx 3\times 10^{-12}$.
Another interesting scenario we took into consideration is that of a cold jet
passing through the kilonova photon bath. Bulk Comptonisation has been
suggested for a long time to take place in blazars, boosting the low-energy
emission from a broad-line region to higher energies Begelman1987 ; Siroka1994
. In this case the observer receives the emission at $h\nu_{\rm b}=\Gamma_{\rm
j,3}^{2}\ \rm 100\ MeV$ and the seed photon luminosity is simply boosted by a
factor of $\tau_{\rm T}\Gamma_{\rm j}^{2}$. This scenario is disfavored due to
extreme requirements on the jet’s luminosity of $L_{\rm j}=4\pi Rm_{\rm
p}c^{3}\Gamma_{\rm j}L_{\rm LAT}/L_{\rm seed}\sigma_{\rm T}\sim 10^{54}\
R_{\rm j,13}\ \Gamma_{\rm j,3}L_{\mathrm{LAT,45}}L_{\mathrm{seed,40.5}}^{-1}\
\rm erg/s$, which would clearly affect the afterglow.

Comparison with afterglow models from other works GRB 211211A has been
analysed by several other groups Rastinejad2022 ; Xiao2022 ; yang2022 . The
preferred afterglow model parameters reported in these works are different
from ours. To address this discrepancy, we produced the same diagnostic plots
as in Figure 3, but using their best-fit parameters, and adopting the
afterglowpy Ryan2020  software (which allows for off-axis viewing angles and
structured jets, as opposed to our modelling which assumes the line of sight
to be on the jet axis, and the jet properties to be uniform within the jet
opening angle). As shown in Figures 8, 9 and 10, the parameters reported in
the preceding works typically lead to predictions that match the multi-
wavelength light curves at $t\gtrsim 10^{4}\,\mathrm{s}$, but fail to
reproduce the early optical data and the XRT photon index (except for Xiao2022
, whose model has the correct photon index in the XRT band). Similarly to our
model, the model from Xiao2022  produces a similar flux as the observed one in
the LAT band in correspondence of the first detection, but with an
inconsistent photon index. All models (including ours) instead are well below
the second LAT detection, further supporting its interpretation as an excess
over the synchrotron afterglow.

Figure 8: Light curves and SEDs with the best fit parameters from Rastinejad
et al. 2022 Rastinejad2022 . Figure 9: Light curves and SEDs with the best fit
parameters from Yang et al. 2022 yang2022 . Figure 10: Light curves and SEDs
with the best fit parameters from Xiao et al. 2022 Xiao2022 .