10 #ifndef EVT_AMPLITUDE_SUM_HH
11 #define EVT_AMPLITUDE_SUM_HH
16 #include "EvtGenBase/EvtAmplitude.hh"
28 for(i=0;i<other.nTerms();i++) {
36 _term.push_back(amp1);
42 for(
size_t i=0;i<_term.size();i++) {
57 _term.push_back(amp.clone());
67 int nTerms()
const {
return _term.size(); }
72 printf(
"Amplitude has %d terms\n",N);
75 printf(
"c%d = (%f,%f)\n",i,real(_c[i]),imag(_c[i]));
81 inline EvtComplex c(
int i)
const {
return _c[i]; }
89 printf(
"Warning: amplitude sum has zero terms\n");
93 for(
size_t i=0;i<_term.size();i++) {
94 value+=_c[i]*_term[i]->evaluate(p);
101 std::vector<EvtComplex> _c;
102 std::vector<EvtAmplitude<T>*> _term;