MaCh3  2.6.0
Reference Guide
SplineCommon.h
Go to the documentation of this file.
1 #pragma once
2 
16 
18 constexpr int _nCoeff_ = 4;
20 constexpr int _nTF1Coeff_ = 2;
21 
24 {
25  kCoeffY = 0,
26  kCoeffB = 1,
27  kCoeffC = 2,
28  kCoeffD = 3
29 };
30 
31 // *******************
33 struct SplineIndex {
34 // *******************
36  virtual ~SplineIndex() = default;
37 
39  int value = 0;
41  int iSample = 0;
43  int iOscChan = 0;
45  int iSyst = 0;
47  int iMode = 0;
49  std::vector<int> iVar{0, 0, 0};
50 
51  #ifndef __CUDACC__
52  // Include ClassDef macro for ROOT dictionary generation, but only in C++ code
54  #endif
55 };
56 
57 // *******************
62 // *******************
64  virtual ~SplineMonoStruct() = default;
65 
67  std::vector<float> coeff_x;
68 
70  std::vector<float> coeff_many;
71 
73  std::vector<unsigned int> nKnots_arr;
74 
76  std::vector<short int> paramNo_arr;
77 
78  #ifndef __CUDACC__
79  // Include ClassDef macro for ROOT dictionary generation, but only in C++ code
81  #endif
82 };
83 
constexpr int _nCoeff_
KS: We store coefficients {y,b,c,d} in one array one by one, this is only to define it once rather th...
Definition: SplineCommon.h:18
SplineSegmentCoeffs
HW: Coefficients for grabbing items from manycoeff_arr (rather than having y=manycoeffarray[index+0])
Definition: SplineCommon.h:24
@ kCoeffB
Coefficient B.
Definition: SplineCommon.h:26
@ kCoeffD
Coefficient D.
Definition: SplineCommon.h:28
@ kCoeffY
Coefficient Y.
Definition: SplineCommon.h:25
@ kCoeffC
Coefficient C.
Definition: SplineCommon.h:27
constexpr int _nTF1Coeff_
KS: For TF1 we store at most 5 coefficients, we could make it more flexible but for now define it her...
Definition: SplineCommon.h:20
Flat representation of a spline index entry.
Definition: SplineCommon.h:33
std::vector< int > iVar
Kinematic bins index, assumed to be size of 3 for now.
Definition: SplineCommon.h:49
int iSample
Sample index.
Definition: SplineCommon.h:41
int iMode
Mode index within a systematic.
Definition: SplineCommon.h:47
int value
Index into the flattened spline weight vector.
Definition: SplineCommon.h:39
virtual ~SplineIndex()=default
destructor
ClassDef(SplineIndex, 1)
int iOscChan
Oscillation channel index.
Definition: SplineCommon.h:43
int iSyst
Systematic parameter index.
Definition: SplineCommon.h:45
KS: Struct storing information for spline monolith.
Definition: SplineCommon.h:61
std::vector< unsigned int > nKnots_arr
KS: CPU Number of knots per spline.
Definition: SplineCommon.h:73
std::vector< float > coeff_x
KS: CPU arrays to hold X coefficient.
Definition: SplineCommon.h:67
std::vector< float > coeff_many
CPU arrays to hold other coefficients.
Definition: SplineCommon.h:70
virtual ~SplineMonoStruct()=default
destructor
std::vector< short int > paramNo_arr
CW: CPU array with the number of points per spline (not per spline point!)
Definition: SplineCommon.h:76
ClassDef(SplineMonoStruct, 1)