8 #ifndef LIBRARIES_TAC_WAVEFORMSPIKEFUNCTOR_H_
9 #define LIBRARIES_TAC_WAVEFORMSPIKEFUNCTOR_H_
26 double operator()(
const double* xArray,
const double* pArray) {
27 static const double zeroTolerance = 1.0e-25;
31 double peakPoint = pArray[1];
32 double riseTime = pArray[2];
35 double expAmpl = pArray[3];
36 double expLambda = pArray[4];
39 if( riseTime > zeroTolerance ) {
40 lineSlope = expAmpl / riseTime;
43 double lineIntersect = expAmpl - lineSlope * peakPoint;
48 if (fabs(expLambda) > 1.0
e-25) {
49 value = expAmpl * exp(-(x - peakPoint) / expLambda) +
pedestal;
54 value = lineSlope * x + lineIntersect +
pedestal;
static TH1I * pedestal[nChan]