BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAmpSubIndex.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
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.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 2002 Caltech
10//
11// Module: EvtAmpSubIndex.cc
12//
13// Description: Class to manipulate the amplitudes in the decays.
14//
15// Modification history:
16//
17// RYD Nov 22, 2002 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtAmpSubIndex.hh"
22#include "EvtAmpIndex.hh"
23#include "EvtPatches.hh"
24#include <vector>
25using std::vector;
26
27EvtAmpSubIndex::EvtAmpSubIndex( EvtAmpIndex* ind, std::vector<int> sub )
28 : _ind( ind ), _sub( sub ), _size( sub.size() ), _nstate( sub.size() ) {
29 int i;
30
31 for ( i = 0; i < _size; i++ )
32 {
33 if ( i == 0 ) { _nstate[i] = 1; }
34 else { _nstate[i] = _nstate[i - 1] * _ind->_ind[sub[i - 1]]; }
35 }
36}
37
39
40 int i;
41 int ind = 0;
42
43 for ( i = 0; i < _size; i++ ) { ind += _ind->_state[_ind->_ind[i]] * _nstate[i]; }
44
45 return ind;
46}
EvtAmpSubIndex(EvtAmpIndex *ind, std::vector< int > sub)