EvtAmpSubIndex Class Reference

#include <EvtAmpSubIndex.hh>

List of all members.

Public Member Functions

 EvtAmpSubIndex (EvtAmpIndex *ind, std::vector< int > sub)
virtual ~EvtAmpSubIndex ()
int index ()

Private Attributes

EvtAmpIndex_ind
std::vector< int > _sub
int _size
std::vector< int > _nstate


Detailed Description

Definition at line 28 of file EvtAmpSubIndex.hh.


Constructor & Destructor Documentation

EvtAmpSubIndex::EvtAmpSubIndex ( EvtAmpIndex ind,
std::vector< int >  sub 
)

Definition at line 28 of file EvtAmpSubIndex.cc.

References EvtAmpIndex::_ind, _ind, _nstate, _size, and genRecEmupikp::i.

00028                                                                  :
00029   _ind(ind),
00030   _sub(sub),
00031   _size(sub.size()),
00032   _nstate(sub.size())
00033 {
00034   int i;
00035   
00036   for(i=0;i<_size;i++) {
00037     if (i==0){
00038       _nstate[i]=1;
00039     }
00040     else{
00041       _nstate[i]=_nstate[i-1]*_ind->_ind[sub[i-1]];
00042     }
00043   }
00044 }

virtual EvtAmpSubIndex::~EvtAmpSubIndex (  )  [inline, virtual]

Definition at line 33 of file EvtAmpSubIndex.hh.

00033 {}


Member Function Documentation

int EvtAmpSubIndex::index (  ) 

Definition at line 47 of file EvtAmpSubIndex.cc.

References EvtAmpIndex::_ind, _ind, _nstate, _size, EvtAmpIndex::_state, and genRecEmupikp::i.

00047                          {
00048 
00049   int i;
00050   int ind=0;
00051 
00052   for(i=0;i<_size;i++) {
00053     ind+=_ind->_state[_ind->_ind[i]]*_nstate[i];
00054   }
00055 
00056   return ind;
00057 
00058 }


Member Data Documentation

EvtAmpIndex* EvtAmpSubIndex::_ind [private]

Definition at line 39 of file EvtAmpSubIndex.hh.

Referenced by EvtAmpSubIndex(), and index().

std::vector<int> EvtAmpSubIndex::_nstate [private]

Definition at line 42 of file EvtAmpSubIndex.hh.

Referenced by EvtAmpSubIndex(), and index().

int EvtAmpSubIndex::_size [private]

Definition at line 41 of file EvtAmpSubIndex.hh.

Referenced by EvtAmpSubIndex(), and index().

std::vector<int> EvtAmpSubIndex::_sub [private]

Definition at line 40 of file EvtAmpSubIndex.hh.


Generated on Tue Nov 29 23:18:52 2016 for BOSS_7.0.2 by  doxygen 1.4.7