SimMat Namespace Reference


Functions

template<class T>
void pack2d (int n, const T *sm, T *pac_sm)
int get_idx (int i, int j)
template<class T>
get_element (const T *pac_sm, int i, int j)
template<class T>
void unpack2d (int n, T *sm, const T *pac_sm)


Function Documentation

template<class T>
void SimMat::pack2d ( int  n,
const T *  sm,
T *  pac_sm 
) [inline]

Definition at line 9 of file SimMatr.h.

References genRecEmupikp::i, and ganga-rec::j.

Referenced by TExtTrack::SetEmcErrorMatrix(), TMdcKalTrack::setFError(), TMdcKalTrack::setFErrorE(), TMdcKalTrack::setFErrorK(), TMdcKalTrack::setFErrorMu(), TMdcKalTrack::setFErrorP(), TExtTrack::SetMucErrorMatrix(), TExtTrack::SetTof1ErrorMatrix(), TExtTrack::SetTof2ErrorMatrix(), TMdcKalTrack::setZError(), TMdcKalTrack::setZErrorE(), TMdcKalTrack::setZErrorK(), TMdcKalTrack::setZErrorMu(), and TMdcKalTrack::setZErrorP().

00010 {
00011   for(int i = 0; i < n; i++) {
00012      for(int j = 0; j <= i; j++) {
00013         int k = i*(i+1)/2 + j;
00014         pac_sm[k] = sm[i*n+j];
00015      }
00016   }
00017 }

int SimMat::get_idx ( int  i,
int  j 
) [inline]

Definition at line 20 of file SimMatr.h.

Referenced by get_element().

00021 {
00022   return (i>j) ? i*(i+1)/2 + j : j*(j+1)/2 + i;
00023 }

template<class T>
T SimMat::get_element ( const T *  pac_sm,
int  i,
int  j 
) [inline]

Definition at line 27 of file SimMatr.h.

References get_idx().

Referenced by TExtTrack::GetEmcErrorMatrix(), TMdcKalTrack::getFError(), TMdcKalTrack::getFErrorE(), TMdcKalTrack::getFErrorK(), TMdcKalTrack::getFErrorMu(), TMdcKalTrack::getFErrorP(), TExtTrack::GetMucErrorMatrix(), TExtTrack::GetTof1ErrorMatrix(), TExtTrack::GetTof2ErrorMatrix(), TMdcKalTrack::getZError(), TMdcKalTrack::getZErrorE(), TMdcKalTrack::getZErrorK(), TMdcKalTrack::getZErrorMu(), and TMdcKalTrack::getZErrorP().

00028 {
00029   return pac_sm[ get_idx(i,j) ];
00030 }

template<class T>
void SimMat::unpack2d ( int  n,
T *  sm,
const T *  pac_sm 
) [inline]

Definition at line 35 of file SimMatr.h.

References genRecEmupikp::i, and ganga-rec::j.

00036 {
00037   for(int i = 0; i < n; i++) {
00038      for(int j = 0; j <= i; j++) {
00039         int k = i*(i+1)/2 + j;
00040         sm[i*n+j] = sm[i+j*n] = pac_sm[k];
00041      }
00042   }
00043 }


Generated on Tue Nov 29 23:36:38 2016 for BOSS_7.0.2 by  doxygen 1.4.7