17 #include "TIterator.h"
18 #include "TStopwatch.h"
41 virtual std::string
GetName()
const {
return "SplineBase";};
133 const std::vector<M3::float_t>& xPts)
const;
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
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.
SplineMonolithGPU * gpu_monolith
KS: Store info about Spline monolith, this allow to obtain better step time. As all necessary informa...
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.
void SynchroniseMemTransfer() const
KS: After calculations are done on GPU we copy memory to CPU. This operation is asynchronous meaning ...
unsigned int NSplines_valid
Number of valid splines.
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.
short int _max_knots
Max knots for production.
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...
bool useGPU
Whether to use GPU or not.
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.
SplineBase(const bool Use_GPU=true)
Constructor.
void PrepareFastSplineInfoDir(std::unique_ptr< TFile > &SplineFile) const
KS: Prepare Fast Spline Info within SplineFile.
short int GetNParams() const
Get number of spline parameters.
void SetupSegments()
Since we find segment before actual reweight and sometimes we want to copy it to GPU we have differen...
Class responsible for calculating spline weight on GPU.
CW: A reduced TF1 class only. Only saves parameters for each TF1 and how many parameters each paramet...