3#pragma GCC diagnostic ignored "-Wuseless-cast"
4#pragma GCC diagnostic ignored "-Wfloat-conversion"
40 if(xArray.size() == 0)
continue;
49 if (xvar <= xArray[0]) {
52 }
else if (xvar >= xArray[nPoints-1]) {
56 }
else if( xArray[PreviousSegment+1] > xvar && xvar >= xArray[PreviousSegment] ) {
57 segment = PreviousSegment;
64 while (kHigh - segment > 1) {
68 if (xvar > xArray[kHalf]) {
77 if (segment >= nPoints-1 && nPoints > 1) segment = nPoints-2;
88 MACH3LOG_ERROR(
"IT SHOULD ALWAYS BE BELOW! (except when segment 0)");
123 for (
int i = 0; i < nPoints; i++) {
#define _nTF1Coeff_
KS: For TF1 we store at most 5 coefficients, we could make it more flexible but for now define it her...
Custom exception class for MaCh3 errors.
virtual ~SplineBase()
Destructor.
short int nParams
Number of parameters that have splines.
void FindSplineSegment()
CW:Code used in step by step reweighting, Find Spline Segment for each param.
short int * SplineSegments
std::vector< FastSplineInfo > SplineInfoArray
float * ParamValues
Store parameter values they are not in FastSplineInfo as in case of GPU we need to copy paste it to G...
void getTF1Coeff(TF1_red *&spl, int &nPoints, float *&coeffs)
CW: Gets the polynomial coefficients for TF1.
CW: A reduced TF1 class only. Only saves parameters for each TF1 and how many parameters each paramet...
double GetParameter(M3::int_t Parameter)
Get a parameter value.
int GetSize()
Get the size.