BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Kinem< R > Class Template Reference

#include <kinem.h>

Classes

union  DI64
 

Public Member Functions

bool operator== (const Kinem &kinem) const
 
double mass (int i) const
 

Protected Types

enum  Invar {
  im1 =0 , ip1 , im2 , ip2 ,
  ip3 , im3 , ip4 , is12 ,
  is23 , im4 , ip5 , is34 ,
  is45 , is15 , im5 , ip6 ,
  im6
}
 

Protected Member Functions

 Kinem ()
 
void zero ()
 
bool eq (const double &a, const double &b) const
 
bool neq (const double &a, const double &b) const
 

Protected Attributes

double kdata [KLEN]
 

Static Protected Attributes

static const uint64_t idelta =5
 
static const int KLEN =R*(R+1)/2
 

Detailed Description

template<int R>
class Kinem< R >

Definition at line 16 of file kinem.h.

Member Enumeration Documentation

◆ Invar

template<int R>
enum Kinem::Invar
protected
Enumerator
im1 
ip1 
im2 
ip2 
ip3 
im3 
ip4 
is12 
is23 
im4 
ip5 
is34 
is45 
is15 
im5 
ip6 
im6 

Definition at line 64 of file kinem.h.

64 {im1=0,
65 ip1, im2,
66 ip2, ip3, im3,
67 ip4, is12, is23, im4,
68 ip5, is34, is45, is15, im5,
69 ip6, /* 6-point inv */ im6};
@ is34
Definition: kinem.h:68
@ im1
Definition: kinem.h:64
@ im4
Definition: kinem.h:67
@ im2
Definition: kinem.h:65
@ is45
Definition: kinem.h:68
@ ip5
Definition: kinem.h:68
@ im6
Definition: kinem.h:69
@ ip3
Definition: kinem.h:66
@ ip2
Definition: kinem.h:66
@ im3
Definition: kinem.h:66
@ ip6
Definition: kinem.h:69
@ im5
Definition: kinem.h:68
@ ip1
Definition: kinem.h:65
@ is15
Definition: kinem.h:68
@ is12
Definition: kinem.h:67
@ is23
Definition: kinem.h:67
@ ip4
Definition: kinem.h:67

Constructor & Destructor Documentation

◆ Kinem()

template<int R>
Kinem< R >::Kinem ( )
inlineprotected

Definition at line 28 of file kinem.h.

28{}

Member Function Documentation

◆ eq()

template<int R>
bool Kinem< R >::eq ( const double &  a,
const double &  b 
) const
inlineprotected

Definition at line 47 of file kinem.h.

48 {
49 const DI64 ia={a};
50 const DI64 ib={b};
51 const int64_t diff=ia.i64-ib.i64;
52 return diff == 0LL || static_cast<uint64_t>(llabs(diff)) <= idelta;
53 }
static const uint64_t idelta
Definition: kinem.h:44
const double b
Definition: slope.cxx:9

◆ mass()

template<int R>
double Kinem< R >::mass ( int  i) const
inline

Definition at line 22 of file kinem.h.

23 {
24 return kdata[(i-1)*(i+2)/2];
25 }
double kdata[KLEN]
Definition: kinem.h:71

◆ neq()

template<int R>
bool Kinem< R >::neq ( const double &  a,
const double &  b 
) const
inlineprotected

Definition at line 55 of file kinem.h.

56 {
57 const DI64 ia={a};
58 const DI64 ib={b};
59 const int64_t diff=ia.i64-ib.i64;
60 return diff != 0LL && static_cast<uint64_t>(llabs(diff)) > idelta;
61 }

◆ operator==()

template<int R>
bool Kinem< R >::operator== ( const Kinem< R > &  kinem) const

Definition at line 75 of file kinem.h.

76{
77 for (int i=0; i<KLEN; i++) {
78 if (not eq(kdata[i], kinem.kdata[i])) return false;
79 }
80 return true;
81}
bool eq(const double &a, const double &b) const
Definition: kinem.h:47
static const int KLEN
Definition: kinem.h:63

◆ zero()

template<int R>
void Kinem< R >::zero
protected

Definition at line 84 of file kinem.h.

85{
86 for (int i=0; i<KLEN; i++) {
87 kdata[i]=0;
88 }
89}

Member Data Documentation

◆ idelta

template<int R>
const uint64_t Kinem< R >::idelta =5
staticprotected

Definition at line 44 of file kinem.h.

Referenced by Kinem< R >::eq(), and Kinem< R >::neq().

◆ kdata

template<int R>
double Kinem< R >::kdata[KLEN]
protected

Definition at line 71 of file kinem.h.

Referenced by Kinem< R >::mass(), and Kinem< R >::operator==().

◆ KLEN

template<int R>
const int Kinem< R >::KLEN =R*(R+1)/2
staticprotected

Definition at line 63 of file kinem.h.


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