bit[0]=0

### FastFirstPeak options: bits 0 and 1

A multitude of the fast first peak options were implemented:

FastFirstPeak is a 0-7: bitmask, bits 0-2 are used:

* bit[0]=0 (values of 0,2): largest peak and its charge

1. look for the first time bin, which value is 1022 in ATWD counts of the ATWD channel, which was used for this bin (normally the highest channel available).

2. find the bin where the waveform reaches its maximum among bins from 0 to the one found in step 1 (or, if it was not found, all bins), which are above the threshold (set with ADCThreshold).

3. from the maximum found in step 2 go downhill to the beginning of the waveform and find the pair of bins between which the increment (i.e., the estimate of the derivative) is the largest.

4. draw a line though these two points and find its intersection with the baseline; that's an estimate of the LE. Fit a parabola in the vicinity of the bin corresponding to the waveform maximum, found in step 2, to get an estimate on the location and amplitude at the maximum; assuming a standard pulse shape (which depends on the 3 parameters and the baseline) find the charge estimate Q contained in the part of the waveform, which is closest to the found LE and maximum.

* bit[0]=1 (values of 1,3): first peak above the threshold and the total waveform charge

1. Advancing through the waveform (from the first time bin), find the first pair of bins with values above the threshold, for which the increment is locally at maximum (i.e., it gets smaller for the next pair, and was smaller for the pair before the found one).

2. draw a line through these two points and find its intersection with the baseline; that's an estimate of the LE. Sum all bin values in the waveform, which are above the threshold; this is an estimate of charge Q.

bit[0]=1