[continues from 4.9]

## 4.10 MECS gain

The term gain customarily refers to the relationship linking PHA or PI channels and energy. In the case of the MECS we ultimately deal with PI channels. The gain relation is not uniform all over the surface of the detector, and is sensitive to temperature variation. It also depends on the High Voltage setting (particular the one of the PMT). All these effects may be compensated, and one can refer the gain to the detector centre at a standard gain.

### 4.10.1 Gain coefficients

The relation between PI channels and energy is described by the following stepwise formula with four linear and parallel stretches (currently all Gi coefficients are equal for a given unit)
```
PI = G1 E + O1 		(E<E1=4.78 keV)
PI = G2 E + O2 		(4.78<E<E2=5.10 keV)
PI = G3 E + O3 		(5.10<E<E3=5.44 keV)
PI = G4 E + O4 		(E>5.44 keV)

```

where the jumps occur in correspondence of the structure of the Xe L-edge.

Fig. 4.10-I : MECS gain relation (click on picture to enlarge)

The relevant coefficients (in order, the Ei, Gi and Oi) are kept in files m{1,2,3}_gain.coeff

Note that one has to add 1 to the above PI numbers if one wishes to number channels from 1 to 256 (this is done in the matrix routines and in the figure above), while one uses the original coefficients to match the telemetry numbering (0-255), like in the gain correction routines

Each MECS unit has its own energy-channel relation; however, for uniformity purposes and to improve signal to noise at some expense of energy resolution, someone uses to equalize them to the M1 unit relation.