![]() |
MaCh3
2.8.0
Reference Guide
|
EW: As SplineBase is an abstract base class we have to do some gymnastics to get it to get it into python. More...
#include <python/splines.h>
Public Member Functions | |
| void | Evaluate () override |
| CW: This Eval should be used when using two separate x,{y,a,b,c,d} arrays to store the weights; probably the best one here! Same thing but pass parameter spline segments instead of variations. More... | |
| std::string | GetName () const override |
| Get class name. More... | |
| void | FindSplineSegment () |
| void | CalcSplineWeights () override |
| CPU based code which eval weight for each spline. More... | |
| SplineBase (const bool Use_GPU=true) | |
| Constructor. More... | |
Public Member Functions inherited from SplineBase | |
| SplineBase (const bool Use_GPU=true) | |
| Constructor. More... | |
| virtual | ~SplineBase () |
| Destructor. More... | |
| short int | GetNParams () const |
| Get number of spline parameters. More... | |
| virtual void | PrepareSplineFile (std::string FileName)=0 |
| KS: Prepare spline file that can be used for fast loading. More... | |
| virtual void | LoadSplineFile (std::string FileName)=0 |
| KS: Load preprocessed spline file. More... | |
| void | SynchroniseMemTransfer () const |
| KS: After calculations are done on GPU we copy memory to CPU. This operation is asynchronous meaning while memory is being copied some operations are being carried. Memory must be copied before actual reweight. This function make sure all has been copied. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SplineBase | |
| void | FindSplineSegment () |
| CW:Code used in step by step reweighting, Find Spline Segment for each param. More... | |
| void | PrepareFastSplineInfoDir (std::unique_ptr< TFile > &SplineFile) const |
| KS: Prepare Fast Spline Info within SplineFile. More... | |
| void | LoadFastSplineInfoDir (std::unique_ptr< TFile > &SplineFile) |
| KS: Load preprocessed FastSplineInfo. More... | |
| void | GetTF1Coeff (TF1_red *&spl, int &nPoints, float *&coeffs) const |
| CW: Gets the polynomial coefficients for TF1. More... | |
| void | SetupSegments () |
| Since we find segment before actual reweight and sometimes we want to copy it to GPU we have different functionality depending if GPU or CPU. More... | |
Protected Attributes inherited from SplineBase | |
| std::vector< FastSplineInfo > | SplineInfoArray |
| short int * | SplineSegments |
| float * | ParamValues |
| Store parameter values they are not in FastSplineInfo as in case of GPU we need to copy paste it to GPU. More... | |
| short int | nParams |
| Number of parameters that have splines. More... | |
| short int | _max_knots |
| Max knots for production. More... | |
| unsigned int | NSplines_valid |
| Number of valid splines. More... | |
| SplineMonolithGPU * | gpu_monolith |
| KS: Store info about Spline monolith, this allow to obtain better step time. As all necessary information for spline weight calculation are here meaning better cache hits. More... | |
| bool | useGPU |
| Whether to use GPU or not. More... | |
EW: As SplineBase is an abstract base class we have to do some gymnastics to get it to get it into python.
|
inlineoverridevirtual |
CPU based code which eval weight for each spline.
Splines are stored using a flat monolithic structure. The monolith is organised as follows:
Once coefficient are grabbed we calculate weight using:
Implements SplineBase.
Definition at line 57 of file splines.h.
|
inlineoverridevirtual |
CW: This Eval should be used when using two separate x,{y,a,b,c,d} arrays to store the weights; probably the best one here! Same thing but pass parameter spline segments instead of variations.
Implements SplineBase.
Definition at line 30 of file splines.h.
|
inlineoverridevirtual |
| SplineBase::SplineBase |
Constructor.
Definition at line 33 of file SplineBase.cpp.