BOSS 7.1.0
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
 
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 , im1 =0 , ip1 , im2 ,
  ip2 , ip3 , im3 , ip4 ,
  is12 , is23 , im4 , ip5 ,
  is34 , is45 , is15 , im5 ,
  ip6 , im6
}
 
enum  Invar {
  im1 =0 , ip1 , im2 , ip2 ,
  ip3 , im3 , ip4 , is12 ,
  is23 , im4 , ip5 , is34 ,
  is45 , is15 , im5 , ip6 ,
  im6 , 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
 
 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 eemmg-lib-new/src/kinem.h.

Member Enumeration Documentation

◆ Invar [1/2]

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 
im1 
ip1 
im2 
ip2 
ip3 
im3 
ip4 
is12 
is23 
im4 
ip5 
is34 
is45 
is15 
im5 
ip6 
im6 

Definition at line 64 of file eemmg-lib-new/src/kinem.h.

◆ Invar [2/2]

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 
im1 
ip1 
im2 
ip2 
ip3 
im3 
ip4 
is12 
is23 
im4 
ip5 
is34 
is45 
is15 
im5 
ip6 
im6 

Definition at line 64 of file eemmg-lib/src/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};

Constructor & Destructor Documentation

◆ Kinem() [1/2]

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

Definition at line 28 of file eemmg-lib-new/src/kinem.h.

28{}

◆ Kinem() [2/2]

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

Definition at line 28 of file eemmg-lib/src/kinem.h.

28{}

Member Function Documentation

◆ eq() [1/2]

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

Definition at line 47 of file eemmg-lib-new/src/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
const double b
Definition: slope.cxx:9

◆ eq() [2/2]

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

Definition at line 47 of file eemmg-lib/src/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 }

◆ mass() [1/2]

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

Definition at line 22 of file eemmg-lib-new/src/kinem.h.

23 {
24 return kdata[(i-1)*(i+2)/2];
25 }
double kdata[KLEN]

◆ mass() [2/2]

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

Definition at line 22 of file eemmg-lib/src/kinem.h.

23 {
24 return kdata[(i-1)*(i+2)/2];
25 }

◆ neq() [1/2]

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

Definition at line 55 of file eemmg-lib-new/src/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 }

◆ neq() [2/2]

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

Definition at line 55 of file eemmg-lib/src/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==() [1/2]

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

Definition at line 75 of file eemmg-lib-new/src/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
static const int KLEN

◆ operator==() [2/2]

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

◆ zero() [1/2]

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

Definition at line 84 of file eemmg-lib-new/src/kinem.h.

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

◆ zero() [2/2]

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

Member Data Documentation

◆ idelta

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

Definition at line 44 of file eemmg-lib-new/src/kinem.h.

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

◆ kdata

template<int R>
double Kinem< R >::kdata
protected

Definition at line 71 of file eemmg-lib-new/src/kinem.h.

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

◆ KLEN

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

Definition at line 63 of file eemmg-lib-new/src/kinem.h.


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