1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 2002 Caltech
11 // Module: EvtAmpSubIndex.cc
13 // Description: Class to manipulate the amplitudes in the decays.
15 // Modification history:
17 // RYD Nov 22, 2002 Module created
19 //------------------------------------------------------------------------
21 #include "EvtGenBase/EvtPatches.hh"
22 #include "EvtGenBase/EvtAmpIndex.hh"
23 #include "EvtGenBase/EvtAmpSubIndex.hh"
28 EvtAmpSubIndex::EvtAmpSubIndex(EvtAmpIndex* ind,std::vector<int> sub):
36 for(i=0;i<_size;i++) {
41 _nstate[i]=_nstate[i-1]*_ind->_ind[sub[i-1]];
47 int EvtAmpSubIndex::index(){
52 for(i=0;i<_size;i++) {
53 ind+=_ind->_state[_ind->_ind[i]]*_nstate[i];