*3.1. X-ray Flares*

Observations of the afterglow emission in the X-ray and optical often display behaviors that are not predicted by the standard scenario, and require the inclusion of additional emission components contributing to the detected radiation. In the standard external forward shock scenario, the afterglow light-curves in the X-ray and optical band are expected to decay following a power-law or a broken power-law behavior, where the breaks are interpreted as the cooling or injection frequency crossing the observed band [38,47,54]. The advent of Swift-XRT and the increasing number of optical follow-up observations performed by ground-based robotic telescopes have highlighted the presence, in a good fraction of cases, of unexpected features in the early time afterglow, such as flares and plateaus [49,57].

Flares are episodes of sudden rebrightenings characterized by a very fast rise of the flux, followed by an exponential decay profile. Comprehensive studies of X-ray afterglows demonstrate that an X-ray flare is observed in ∼33% of the GRBs [84,85]. The times at which they are observed span a very wide range, from around <sup>∼</sup>30 s up to <sup>∼</sup>10<sup>6</sup> s after the trigger time. The time where the flare peaks is shown in Figure 6 (*Tpk*, *x*-axis) for a large sample of 468 X-ray flares in long GRBs. Most of the flares occur within 10<sup>3</sup> s, even though there are many cases of flares occurring several hours after the burst. The width of the flare *ω* is found to evolve linearly with time to larger values following the trend *ω* ∼ 0.2*Tpk* [84]. The average and peak luminosities *L* of the flare also display a dependence from *Tpk*, with *L* ∝ *T* −2.7 *pk* at least for early time (*Tpk* <sup>&</sup>lt; <sup>10</sup><sup>3</sup> s) flares [84,85]. When also including late time flares [86,87], a shallower index is obtained, around ∼−1.2. The energy emitted during flare episodes is quite large and, for early time flares, is around ∼10% of the prompt emission or sometimes even comparable [88].

Flares have also been detected in the optical, although the sample of optical flares is far smaller than the X-ray one [89]. A statistical study of optical flares detected by Swift/UVOT demonstrates that most of them correlate with and share similar temporal properties to simultaneous X-ray flares. Nevertheless, there are a few dozen of GRBs for which no X-ray flaring activity is observed simultaneously with optical flares [89].

Flares are believed to have an inner origin and to be associated with a prolonged activity of the GRB central engine [57,90–94]. However, the relatively long timescales on which they are detected represent a challenge for the model. Many questions are still open, such as the location of the emitting region, what is powering the flares, and whether late time flares have a different origin than flares detected at early times.

Speculations about possible signatures of X-ray flares in the GeV-TeV range are present in the literature [95–98]. Assuming that flares have an internal origin and are produced at *R* < *Rdec*, forward shock electrons will be exposed to the flare radiation, producing an IC emission component by up-scattering the flare photons. Following these estimates, the IC component peaks at ∼ 100 GeV and has a flux comparable to the X-ray flux. Alternatively, GeV-TeV radiation associated to flares can be produced by the SSC mechanism, where electrons responsible for X-ray synchrotron flares also upscatter these photons to higher energies. The process is considered less interesting for TeV radiation because the peak of this SSC component is expected to be around 1 GeV [95], due to a relatively low minimum Lorentz factor *γmin* ∼ 60. Such value is estimated from theoretical considerations where *γmin* ' 60*ee*,−1(Γ*IS* − 1) for *p* = 2.5, *e<sup>e</sup>* = 0.1 and a relative shock Lorentz factor Γ*IS* of the order of unity. We notice that the recent estimates of the minimum electron Lorentz factor in the late prompt emission of GRBs [29] may modify these predictions, and place the expected SSC around 100 GeV. The luminosity of this component will strongly depend on the size of the emitting region. As a result, the detection of flares in GeV-TeV band can provide relevant information to identify the properties at the emitting region and the production site of the flaring activity.

To understand what the chances of current and future VHE ground-based instruments are in contributing to the study of flares, we perform some simplified estimates. The MAGIC telescopes observed 138 GRBs in almost ∼16.5 years, from 2005 up to June 2021 [99]. More than half of them (74 events) have been observed with delays from shorter than 10<sup>3</sup> s, which means <sup>∼</sup>4.5 GRBs yr−<sup>1</sup> , and 37 events observed with delays shorter than 100 s (i.e., 2.2 GRB yr−<sup>1</sup> ). Considering that ∼33% of the long GRBs have an X-ray flare and considering the distribution of their peak times (see Figure 6), we estimate that ∼1 GRBs/yr is the rate of GRBs with an X-ray flare occurring during MAGIC observations.

**Figure 6.** Average fluxes of Swift-XRT flares in the 0.3–10 keV energy range versus peak times *Tpk*. The blue points are the 468 flares observed by Swift from April 2005 to March 2015 (collected from [87]). The orange line is the resulting linear regression, which gives the expression: log *Fav* = −6.76 − 1.08 × log *Tpk*.

Let us go a bit further and estimate the detectability of a putative <sup>∼</sup>10<sup>2</sup> GeV counterpart of X-ray flares. For the flux of the GeV-TeV flare, we consider as reference value the X-ray flux, and discuss what happens if a similar or ten times smaller flux is emitted at <sup>∼</sup>10<sup>2</sup> GeV.

We collect the X-ray flux of a large sample of flares from the catalog of X-ray flares presented in [87]. The results are shown in Figure 6. The average flux of the flare and the flare peak time correlate, and the orange line represents the best fit. To perform the estimates, we consider two different flare peak times, *Tpk* = 10<sup>2</sup> s and *Tpk* = 10<sup>3</sup> s. The typical average fluxes at those times are *<sup>F</sup>* <sup>=</sup> <sup>1</sup> <sup>×</sup> <sup>10</sup>−<sup>9</sup> erg cm−<sup>2</sup> s <sup>−</sup><sup>1</sup> and *<sup>F</sup>* <sup>=</sup> <sup>1</sup> <sup>×</sup> <sup>10</sup>−<sup>10</sup> erg cm−<sup>2</sup> s −1 , respectively. Assuming that a similar amount of flux is emitted around 100 GeV we can compare these values with the differential sensitivity as a function of the observing time of IACT instruments. Figure 7 [100] shows the sensitivity for several telescopes to the detection of a point-like source at five standard deviations significance as a function of the exposure time and for four selected energies. Considering that the width of the flare is related to the peak time following the relation *ω* ∼ 0.2*Tpk*, we can compare the flare fluxes

estimated at *Tpk* = 10<sup>2</sup> s and *Tpk* = 10<sup>3</sup> s with the differential sensitivity for observing the time of *tobs* = 20 s and *tobs* = 200 s. The flare fluxes lie close to the differential sensitivity of the MAGIC telescopes (for 100 GeV at *<sup>t</sup>obs* <sup>=</sup> <sup>20</sup> s is <sup>∼</sup> 1.0 <sup>×</sup> <sup>10</sup>−<sup>9</sup> erg cm−<sup>2</sup> s <sup>−</sup><sup>1</sup> and at *<sup>t</sup>obs* <sup>=</sup> <sup>200</sup> s is <sup>∼</sup> 5.0 <sup>×</sup> <sup>10</sup>−<sup>10</sup> erg cm−<sup>2</sup> s −1 ). This indicates that MAGIC telescopes can barely detect such a flare. Moreover, Extragalactic Background Light (EBL) attenuation reduces the flux, which is why we are making the estimates at 100 GeV, where the attenuation is still small. We conclude that MAGIC would be able to detect (or place relevant constraints on) only the brightest X-ray flares (as can be observed in Figure 6, the correlation has a large spread, and flares at 10<sup>2</sup> or 10<sup>3</sup> s can easily have fluxes one order of magnitude larger than what is assumed here).

Concerning future instruments, the Cherenkov Telescope Array (CTA<sup>3</sup> ) will have a sensitivity which is almost one order of magnitude lower than the MAGIC one and similar slewing capabilities. The same estimates performed for MAGIC can be applied to CTA, with the advantage that CTA will have a northern and southern sites, approximately doubling the possibility to follow GRBs within short time-scales. This is a promising indication that the CTA array will be potentially able to detect possible counterparts at *E* ∼ 30 the GeV of X-ray flares, provided that this counterpart has a flux that is no less than ten times smaller than what is detected in X-rays. As a result, it can play a major role in exploring and improving our knowledge of flares and their connection with prompt emission and with the prolonged activity of the central engine.

**Figure 7.** Differential sensitivity as a function of the observation time for several HE and VHE instruments (Fermi-LAT, MAGIC, VERITAS and CTA) at four selected energies (75, 100, 150, 250 GeV). From [100].
