MaCh3 2.2.1
Reference Guide
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PySplineBase Class Reference

EW: As SplineBase is an abstract base class we have to do some gymnastics to get it to get it into python. More...

Inheritance diagram for PySplineBase:
[legend]
Collaboration diagram for PySplineBase:
[legend]

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.
 
std::string GetName () const override
 Get class name.
 
void FindSplineSegment ()
 
void CalcSplineWeights () override
 CPU based code which eval weight for each spline.
 
void ModifyWeights () override
 Calc total event weight.
 
 SplineBase ()
 Constructor.
 
- Public Member Functions inherited from SplineBase
 SplineBase ()
 Constructor.
 
virtual ~SplineBase ()
 Destructor.
 
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; probably the best one here! Same thing but pass parameter spline segments instead of variations.
 
virtual std::string GetName () const
 Get class name.
 
short int GetNParams () const
 Get number of spline parameters.
 

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.
 
virtual void CalcSplineWeights ()=0
 CPU based code which eval weight for each spline.
 
virtual void ModifyWeights ()=0
 Calc total event weight.
 
void getTF1Coeff (TF1_red *&spl, int &nPoints, float *&coeffs)
 CW: Gets the polynomial coefficients for TF1.
 
- Protected Attributes inherited from SplineBase
std::vector< FastSplineInfoSplineInfoArray
 
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.
 
short int nParams
 Number of parameters that have splines.
 

Detailed Description

EW: As SplineBase is an abstract base class we have to do some gymnastics to get it to get it into python.

Definition at line 19 of file splines.cpp.

Member Function Documentation

◆ CalcSplineWeights()

void PySplineBase::CalcSplineWeights ( )
inlineoverridevirtual

CPU based code which eval weight for each spline.

Implements SplineBase.

Definition at line 52 of file splines.cpp.

52 {
53 PYBIND11_OVERRIDE_PURE_NAME(
54 void, /* Return type */
55 SplineBase, /* Parent class */
56 "calculate_weights", /* Name in python*/
57 CalcSplineWeights /* Name of function in C++ (must match Python name) */
58 );
59 }
void CalcSplineWeights() override
CPU based code which eval weight for each spline.
Definition: splines.cpp:52
Base class for calculating weight from spline.
Definition: SplineBase.h:25

◆ Evaluate()

void PySplineBase::Evaluate ( )
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 25 of file splines.cpp.

25 {
26 PYBIND11_OVERRIDE_PURE_NAME(
27 void, /* Return type */
28 SplineBase, /* Parent class */
29 "evaluate", /* Name in python*/
30 Evaluate /* Name of function in C++ (must match Python name) */
31 );
32 }
void Evaluate() override
CW: This Eval should be used when using two separate x,{y,a,b,c,d} arrays to store the weights; proba...
Definition: splines.cpp:25

◆ FindSplineSegment()

void PySplineBase::FindSplineSegment ( )
inline

Definition at line 43 of file splines.cpp.

43 {
44 PYBIND11_OVERRIDE_PURE_NAME(
45 void, /* Return type */
46 SplineBase, /* Parent class */
47 "find_segment", /* Name in python*/
48 FindSplineSegment /* Name of function in C++ (must match Python name) */
49 );
50 }
void FindSplineSegment()
Definition: splines.cpp:43

◆ GetName()

std::string PySplineBase::GetName ( ) const
inlineoverridevirtual

Get class name.

Reimplemented from SplineBase.

Definition at line 34 of file splines.cpp.

34 {
35 PYBIND11_OVERRIDE_NAME(
36 std::string, /* Return type */
37 SplineBase, /* Parent class */
38 "get_name", /* Name in python*/
39 GetName /* Name of function in C++ (must match Python name) */
40 );
41 }
std::string GetName() const override
Get class name.
Definition: splines.cpp:34

◆ ModifyWeights()

void PySplineBase::ModifyWeights ( )
inlineoverridevirtual

Calc total event weight.

Implements SplineBase.

Definition at line 61 of file splines.cpp.

61 {
62 PYBIND11_OVERRIDE_PURE_NAME(
63 void, /* Return type */
64 SplineBase, /* Parent class */
65 "modify_weights", /* Name in python*/
66 ModifyWeights /* Name of function in C++ (must match Python name) */
67 );
68 }
void ModifyWeights() override
Calc total event weight.
Definition: splines.cpp:61

◆ SplineBase()

SplineBase::SplineBase ( )

Constructor.

Definition at line 28 of file SplineBase.cpp.

7 {
8// *****************************************
9 nParams = 0;
10 SplineSegments = nullptr;
11 ParamValues = nullptr;
12}
short int nParams
Number of parameters that have splines.
Definition: SplineBase.h:64
short int * SplineSegments
Definition: SplineBase.h:60
float * ParamValues
Store parameter values they are not in FastSplineInfo as in case of GPU we need to copy paste it to G...
Definition: SplineBase.h:62

The documentation for this class was generated from the following file: