48 for ( i = 0; i <
m_ndaug; i++ ) {
61 for ( i = 0; i < namp; i++ ) {
71 int daug_states[100], parstates;
72 for ( ichild = 0; ichild < ndaugs; ichild++ ) {
99 for ( i = 0; i <
m_ndaug; i++ ) {
102 if ( daug_states[i] > 1 ) {
111 <<
"Too many nontrivial states in EvtAmp!" << endl;
118 int position = ind[0];
122 position += nstatepad * ind[i];
124 assert( position < 125 );
131 int position = ind[0];
135 position += nstatepad * ind[i];
138 return m_amp[position];
164 for ( i = 0; i < n; i++ ) {
168 rho.
set( 0, 0, temp );
183 for ( kk = 0; kk <
m_ndaug; kk++ ) {
187 for ( kk = 0; kk < allloop; kk++ ) {
196 rho.
set( i, j, temp );
218 ampprime = ( *this );
220 for ( k = 0; k <
m_ndaug; k++ ) {
226 return ampprime.
contract( 0, ( *
this ) );
245 ampprime = ( *this );
248 ampprime = ampprime.
contract( 0, rho_list[0] );
251 for ( k = 0; k < i; k++ ) {
269 for ( i = 0; i <
m_ndaug; i++ ) {
276 <<
"Should not be here EvtAmp!" << endl;
286 for ( i = 0; i < 10; i++ ) {
296 for ( i = 0; i < allloop; i++ ) {
298 int tempint = index[k];
299 for ( j = 0; j <
m_nstate[k]; j++ ) {
301 c += rho.
get( j, tempint ) *
getAmp( index );
309 if ( indflag == 0 ) {
310 if ( index[ii] == (
m_nstate[ii] - 1 ) ) {
340 for ( i = 0; i <
m_nstate[k]; i++ ) {
341 for ( j = 0; j <
m_nstate[k]; j++ ) {
344 <<
"Should not be here1 EvtAmp!" << endl;
349 for ( ii = 0; ii < 10; ii++ ) {
358 for ( l = 0; l < int( allloop /
m_nstate[k] ); l++ ) {
363 if ( indflag == 0 ) {
364 if ( index[ii] == (
m_nstate[ii] - 1 ) ) {
376 rho.
set( i, j, temp );
388 <<
"EvtAmp::contract not written yet" << endl;
395 for ( i = 0; i < 10; i++ ) {
400 <<
"Number of daugthers:" <<
m_ndaug << endl;
402 <<
"Number of states of the parent:" <<
m_pstates << endl;
404 for ( i = 0; i <
m_ndaug; i++ ) {
409 for ( i = 0; i <
m_ndaug; i++ ) {
414 <<
"number of nontrivial states:" <<
m_nontrivial << endl;
416 <<
"Nontrivial particles number of states:";
428 for ( i = 0; i < 10; i++ ) {
437 allloop[i] = allloop[i - 1] *
m_nstate[i];
443 if ( i == allloop[index] - 1 ) {
450 <<
"-----------------------------------" << endl;
495 for ( i = 0; i <
m_ndaug; i++ ) {
508 for ( i = 0; i < namp; i++ ) {
EvtComplex conj(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
const EvtComplex & getAmp(int *ind) const
void setAmp(int *ind, const EvtComplex &)
void vertex(const EvtComplex &)
EvtSpinDensity contract(int i, const EvtAmp &a) const
EvtSpinDensity getBackwardSpinDensity(EvtSpinDensity *rho_list) const
EvtSpinDensity getSpinDensity() const
EvtSpinDensity getForwardSpinDensity(EvtSpinDensity *rho_list, int k) const
EvtAmp & operator=(const EvtAmp &)
void setNState(int parent_states, int *daug_states)
void init(EvtId p, int ndaug, const EvtId *daug)
static EvtSpinType::spintype getSpinType(EvtId i)
const EvtComplex & get(int i, int j) const
void set(int i, int j, const EvtComplex &rhoij)
static int getSpinStates(spintype stype)