MINT2
Public Member Functions | Private Attributes | List of all members
RooCubicSplineKnot::S2_jk Class Reference

#include <RooCubicSplineKnot.h>

Public Member Functions

 S2_jk ()
 
 S2_jk (double a1, double b1, double c1, double a2, double b2, double c2)
 
 S2_jk (const S2_jk &other, double offset=0)
 
S2_jkoperator *= (double z)
 
S2_jkoperator/= (double z)
 
S2_jk operator- ()
 
S2_jkoperator+= (const S2_jk &other)
 
S2_jkoperator-= (const S2_jk &other)
 
S2_jk operator * (double z) const
 
S2_jk operator/ (double z) const
 
S2_jk operator+ (const S2_jk &other) const
 
S2_jk operator- (const S2_jk &other) const
 
double operator() (int j, int k) const
 

Private Attributes

double t0
 
double t1
 
double t2
 
double t3
 
double t4
 
double t5
 
double t6
 

Detailed Description

Definition at line 88 of file RooCubicSplineKnot.h.

Constructor & Destructor Documentation

◆ S2_jk() [1/3]

RooCubicSplineKnot::S2_jk::S2_jk ( )
inline

◆ S2_jk() [2/3]

RooCubicSplineKnot::S2_jk::S2_jk ( double  a1,
double  b1,
double  c1,
double  a2,
double  b2,
double  c2 
)
inline

Definition at line 91 of file RooCubicSplineKnot.h.

91  :
92  t0(a1*b1*c1*a2*b2*c2),
93  t1(1./2.*((a1*b1*c1)*(a2*b2+a2*c2+b2*c2)+(a2*b2*c2)*(a1*b1+a1*c1+b1*c1))),
94  t2(1./4.*((a1*b1*c1)*(a2+b2+c2)+(a2*b2*c2)*(a1+b1+c1)+(a1*b1+a1*c1+b1*c1)*(a2*b2+a2*c2+b2*c2))),
95  t3(1./8.*((a1*b1*c1)+(a2*b2*c2)+(a1+b1+c1)*(a2*b2+a2*c2+b2*c2)+(a2+b2+c2)*(a1*b1+a1*c1+b1*c1))),
96  t4(1./16.*((a1*b1+a1*c1+b1*c1)+(a2*b2+a2*c2+b2*c2)+(a1+b1+c1)*(a2+b2+c2))),
97  t5(1./32.*((a1+b1+c1)+(a2+b2+c2))),
98  t6(1./64.)
99  { }

◆ S2_jk() [3/3]

RooCubicSplineKnot::S2_jk::S2_jk ( const S2_jk other,
double  offset = 0 
)
inline

Definition at line 100 of file RooCubicSplineKnot.h.

100  : t0(other.t0), t1(other.t1), t2(other.t2), t3(other.t3), t4(other.t4), t5(other.t5), t6(other.t6) {
101  if (!offset) return;
102  t0+=offset*(-2*t1+offset*(4*t2+offset*(-8*t3+offset*(16*t4+offset*(-32*t5+offset*64*t6)))));
103  t1+=offset*(-8*t2+offset*(3*8*t3+offset*(-4*16*t4+offset*(5*32*t5-6*offset*64*t6))))/2;
104  t2+=offset*(-3*8*t3+offset*(6*16*t4+offset*(-10*32*t5+15*offset*64*t6)))/4;
105  t3+=offset*(-4*16*t4+offset*(10*32*t5-20*offset*64*t6))/8;
106  t4+=offset*(-5*32*t5+15*offset*64*t6)/16;
107  t5-=offset*6*64*t6/32;
108  }

Member Function Documentation

◆ operator *()

S2_jk RooCubicSplineKnot::S2_jk::operator * ( double  z) const
inline

Definition at line 115 of file RooCubicSplineKnot.h.

115 { return S2_jk(*this)*=z; }

◆ operator *=()

S2_jk& RooCubicSplineKnot::S2_jk::operator *= ( double  z)
inline

◆ operator()()

double RooCubicSplineKnot::S2_jk::operator() ( int  j,
int  k 
) const
inline

Definition at line 121 of file RooCubicSplineKnot.h.

121  {
122  if (j>k) std::swap(j,k);
123  assert(0<=j&&j<7);
124  assert(0<=k&&k<7-j);
125  switch(6*j+k) {
126  case 0: return t0; // (0,0)
127  case 1: return -t1; // (0,1),(1,0)
128  case 2: return t2; // (0,2),(2,0)
129  case 3: return -t3; // (0,3),(3,0)
130  case 4: return t4; // (0,4),(4,0)
131  case 5: return -t5; // (0,5),(5,0)
132  case 6: return t6; // (0,6),(6,0)
133  case 7: return 2*t2; // (1,1)
134  case 8: return -3*t3; // (1,2),(2,1)
135  case 9: return 4*t4; // (1,3),(3,1)
136  case 10:return -5*t5; // (1,4),(4,1)
137  case 11:return 6*t6; // (1,5),(5,1)
138  case 14:return 6*t4; // (2,2)
139  case 15:return -10*t5; // (2,3),(3,2)
140  case 16:return 15*t6; // (2,4),(4,2)
141  case 21:return 20*t6; // (3,3)
142  }
143  assert(1==0);
144  return 0;
145  }

◆ operator+()

S2_jk RooCubicSplineKnot::S2_jk::operator+ ( const S2_jk other) const
inline

Definition at line 117 of file RooCubicSplineKnot.h.

117 { return S2_jk(*this)+=other; }

◆ operator+=()

S2_jk& RooCubicSplineKnot::S2_jk::operator+= ( const S2_jk other)
inline

Definition at line 112 of file RooCubicSplineKnot.h.

112 { t0+=other.t0; t1+=other.t1; t2+=other.t2; t3+=other.t3; t4+=other.t4; t5+=other.t5; t6+=other.t6; return *this; }

◆ operator-() [1/2]

S2_jk RooCubicSplineKnot::S2_jk::operator- ( )
inline

◆ operator-() [2/2]

S2_jk RooCubicSplineKnot::S2_jk::operator- ( const S2_jk other) const
inline

Definition at line 118 of file RooCubicSplineKnot.h.

118 { return S2_jk(*this)-=other; }

◆ operator-=()

S2_jk& RooCubicSplineKnot::S2_jk::operator-= ( const S2_jk other)
inline

Definition at line 113 of file RooCubicSplineKnot.h.

113 { t0-=other.t0; t1-=other.t1; t2-=other.t2; t3-=other.t3; t4-=other.t4; t5-=other.t5; t6-=other.t6; return *this; }

◆ operator/()

S2_jk RooCubicSplineKnot::S2_jk::operator/ ( double  z) const
inline

Definition at line 116 of file RooCubicSplineKnot.h.

116 { return S2_jk(*this)/=z; }

◆ operator/=()

S2_jk& RooCubicSplineKnot::S2_jk::operator/= ( double  z)
inline

Member Data Documentation

◆ t0

double RooCubicSplineKnot::S2_jk::t0
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t1

double RooCubicSplineKnot::S2_jk::t1
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t2

double RooCubicSplineKnot::S2_jk::t2
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t3

double RooCubicSplineKnot::S2_jk::t3
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t4

double RooCubicSplineKnot::S2_jk::t4
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t5

double RooCubicSplineKnot::S2_jk::t5
private

Definition at line 147 of file RooCubicSplineKnot.h.

◆ t6

double RooCubicSplineKnot::S2_jk::t6
private

Definition at line 147 of file RooCubicSplineKnot.h.


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