BOSS 7.0.6
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//
24#include <vector>
25using std::vector;
26
27
29 _ind(ind),
30 _sub(sub),
31 _size(sub.size()),
32 _nstate(sub.size())
33{
34 int i;
35
36 for(i=0;i<_size;i++) {
37 if (i==0){
38 _nstate[i]=1;
39 }
40 else{
41 _nstate[i]=_nstate[i-1]*_ind->_ind[sub[i-1]];
42 }
43 }
44}
45
46
48
49 int i;
50 int ind=0;
51
52 for(i=0;i<_size;i++) {
53 ind+=_ind->_state[_ind->_ind[i]]*_nstate[i];
54 }
55
56 return ind;
57
58}
59
60
61
62
63
64
65
66
67
68
69
EvtAmpSubIndex(EvtAmpIndex *ind, std::vector< int > sub)