I used charge injection calibrations made at NRL after GSI beam test
the same gains as at GSI
the same FLE and FHE threshold settings
all known crosstalk effects should be taken into account automatically
for each range the function DAC vs ADC was fitted with cubic spline function (adc2dac)
non-linearity correction is calculated for each range so that adc=2000 (pedestal subtracted) stays unchanged:
lin_corr(adc) =adc2dac(adc)*2000/adc2dac(2000)
the quality of these corrections could be tested by looking at correlation hex8cor vs lex1cor for carbon data: if corrections work, the plot should be linear
in reality, there is still some residual non-linearity
it could be explained by crosstalk LEX8=>HEX8, which has been taken into account by charge injection calibration, because the input signal ratio HEX8/LEX8 for charge injection is ~50 times bigger, than for real scintillation signal.
this crosstalk could be measured if LE and hE ranges are pulsed separately
for the moment I tuned crosstalk value to get the best fit - see the result
residual non-linearity significantly smaller than 1%