# Joint FAR calculation¶

One of the main methods to distinguish between a real or noise triggers of any candidate is to calculate the False Alarm Rate (FAR). The main motivation behind using the joint FAR between gravitational wave (GW) and electromagnetic (EM) triggers are to indicate which candidate should receive additional follow-up.

Given the information about the gravitational wave candidate and its associated astrophysical counterpart, the coincident false alarm rate $$FAR_{c}$$ is calculated depending on the search method. Two search methods are:

## Untargeted search method¶

In the untargeted search method, we look for independent gravitational wave and electromagnetic wave (EM) candidates. GRBs of higher statistical significance are considered and GWs can be of very low significance. So, for the untargeted search analysis, the joint coincident FAR is

$FAR_{c} = FAR_{gw} \frac{R_{grb} \Delta t}{I_{\Omega}}$

where $$FAR_{gw}$$ is the false alarm rate of the GW candidate given by one of the GW pipelines such as GstLAL, MBTAOnline, PyCBC Live, SPIIR, or cWB. $$R_{grb}$$ are the rate of the unique GRB candidates given by all participating EM signal detectors, $$\Delta t$$ is the coincident time window of the GW-GRB signal, and $$I_{\Omega}$$ is the sky map overlap integral outlined below.

## Targeted search method¶

In the targeted search method, we respond to GRB triggers coming from GRB experiments and look for gravitational wave events happened around that time. Because of this, we consider sub-threshold GRB candidates, which now should dominate the rate compared to real detections. Since the GRB candidates were searched for only around GW times making this a targeted search and the joint coincident FAR for this search method is calculated as

$FAR_c = \frac{Z}{I_{\Omega}} \left( 1 + \ln(\frac{Z_{max}}{Z}) \right)$

where Z is the joint ranking statistic defined as:

$Z = FAR_{gw} FAR_{grb} \Delta t$

and the max Z value is calculated using the maximum GW and GRB FAR thresholds.

## Skymap overlap integral¶

In RAVEN, we have built functionality to use different skymap formats for the skymap overlap integral as first derived in Ashton et. al. (2018) :

$I_{\Omega}(x_{gw}, x_{grb}) = \int \frac{p({\Omega}| x_{gw}, \mathcal{H}_{gw}^s) p({\Omega}| x_{grb}, \mathcal{H}_{grb}^s)}{p({\Omega}| \mathcal{H}^s)} d{\Omega}$

Two methods to incorporate the skymap in calculating the skymap overlap integral ($$I_{\Omega}$$) are listed as follows:

### Hierarchical Equal Area isoLatitude Pixelization (HEALPix) method¶

In this method, the sky map overlap integral is calculated as

$I_{\Omega}(x_{gw}, x_{grb}) = N_{pix} \sum_{i=0}^{N_{pix}} P(i| x_{gw}, \mathcal{H}_{gw}^s) \cdot P(i| x_{grb}, \mathcal{H}_{grb}^s)$

where $$N_{pix}$$ is the number of pixels in a skymap.

### Multi-Ordered Coverage (MOC) method¶

In this method, we use RA and DEC of given pixel $$\Omega_{i}$$ to match pixels of MOC skymaps and calculate the overlap integral as

$I_{\Omega}(x_{1}, x_{2}) = 4 \pi \sum_{i_{1}}^{N_{pix}} p(\Omega_{1}(i_{1})| x_{1}, \mathcal{H}^s) \cdot p(\Omega_{1}(i_{1})| x_{2}, \mathcal{H}^s) \cdot \Delta A (i_{1})$

where $$p(\Omega_{1}(i)| x_{a}, \mathcal{H}^s)$$ is the normalized probability density such that $$\sum_{i}p(\Omega_{1}(i)| x_{a}, \mathcal{H}^s)\Delta A = 1.$$

The UNIQ ordering system has an advantage over the standard HEALPix system where equal-area pixels are used. MOC skymaps can increase resolution around the higher probability regions and vice versa, reducing file size. Moreover, we find using MOC skymaps gives the same result compared to the HEALPix method with much lower latency.