17 #include "TIterator.h"
18 #include "TStopwatch.h"
38 virtual std::string
GetName()
const {
return "SplineBase";};
92 const std::vector<M3::float_t>& xPts)
const;
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
KS: Restore warning checking after including external headers.
Contains definitions for spline coefficients and structure used in both CPU and GPU code.
Contains structures and helper functions for handling spline representations of systematic parameters...
Base class for calculating weight from spline.
virtual ~SplineBase()
Destructor.
void CheckSegmentValidity(const M3::int_t i, const M3::int_t segment, const M3::float_t xvar, const std::vector< M3::float_t > &xPts) const
Validates that the spline segment is correct for the given variation.
void GetTF1Coeff(TF1_red *&spl, int &nPoints, float *&coeffs) const
CW: Gets the polynomial coefficients for TF1.
virtual void CalcSplineWeights()=0
CPU based code which eval weight for each spline.
short int nParams
Number of parameters that have splines.
virtual std::string GetName() const
Get class name.
void FindSplineSegment()
CW:Code used in step by step reweighting, Find Spline Segment for each param.
virtual void Evaluate()=0
CW: This Eval should be used when using two separate x,{y,a,b,c,d} arrays to store the weights; proba...
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...
virtual void PrepareSplineFile(std::string FileName)=0
KS: Prepare spline file that can be used for fast loading.
virtual void LoadSplineFile(std::string FileName)=0
KS: Load preprocessed spline file.
void LoadFastSplineInfoDir(std::unique_ptr< TFile > &SplineFile)
KS: Load preprocessed FastSplineInfo.
void PrepareFastSplineInfoDir(std::unique_ptr< TFile > &SplineFile) const
KS: Prepare Fast Spline Info within SplineFile.
virtual void SynchroniseMemTransfer() const =0
KS: After calculations are done on GPU we copy memory to CPU. This operation is asynchronous meaning ...
short int GetNParams() const
Get number of spline parameters.
CW: A reduced TF1 class only. Only saves parameters for each TF1 and how many parameters each paramet...