The computation of the likelihood usually occurs many times. Fitting involves varying model parameters until the best values are found (the methodology is described elsewhere). Fits are done with various model parameters fixed or with different sources present or absent. Certain quantities need be calculated only once, speeding up the repeated computation of the likelihood.
The LAT instrument response functions are a function of the inclination angle, the angle between the direction to a source and the LAT normal. The number of counts that a source should produce should therefore depend on the amount of time that the source spent at a given inclination angle during an observation. This livetime quantity, the time that the LAT observed a given position on the sky at a given inclination angle, depends only on the history of the LAT's orientation during the observation and not on the source model. The array of these livetimes at all points on the sky is called the 'livetime cube.' As a practical matter, the livetime cubes are provided on a healpix grid on the sky and in inclination angle bins (see Livetime and Exposure section).
The likelihood consists of two factors: the first is dependent on the detected counts and differs between binned and unbinned likelihood calculations; and the second is equal to the exponential of the negative of the expected total number of counts Nexp for the source model. The exposure map is the total exposurearea multiplied by timefor a given position on the sky producing counts in the Region of Interest. Since the response function is a function of the photon energy, the exposure map is also a function of this energy. Thus the counts produced by a source at a given position on the sky is the integral of the source flux and the exposure map (a function of energy) at that position. The exposure map is used for extended sources such as the diffuse Galactic and Extragalactic backgrounds and not for individual sources.
The exposure map should be computed over a Source Region that is larger than the Region of Interest by ~50%. This is necessary to insure that all source photons are included due to the size of the LAT instrument PSF at low energies.