BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinAmp.cc File Reference
#include "EvtGenBase/EvtPatches.hh"
#include "EvtGenBase/EvtReport.hh"
#include "EvtGenBase/EvtSpinAmp.hh"
#include <cstdlib>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const EvtSpinAmp &amp)
 
EvtSpinAmp operator* (const EvtComplex &real, const EvtSpinAmp &cont)
 
EvtSpinAmp operator* (const EvtSpinAmp &cont, const EvtComplex &real)
 
EvtSpinAmp operator/ (const EvtSpinAmp &cont, const EvtComplex &real)
 

Function Documentation

◆ operator*() [1/2]

EvtSpinAmp operator* ( const EvtComplex real,
const EvtSpinAmp cont 
)

Definition at line 25 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinAmp.cc.

26{
27 EvtSpinAmp ret( cont );
28
29 for( int i=0; i<ret._elem.size(); ++i ) {
30 ret._elem[i] *= real;
31 }
32
33 return ret;
34}
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)

◆ operator*() [2/2]

EvtSpinAmp operator* ( const EvtSpinAmp cont,
const EvtComplex real 
)

Definition at line 36 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinAmp.cc.

37{
38 return real*cont;
39}

◆ operator/()

EvtSpinAmp operator/ ( const EvtSpinAmp cont,
const EvtComplex real 
)

Definition at line 41 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinAmp.cc.

42{
43 EvtSpinAmp ret( cont );
44
45 for( int i=0; i<ret._elem.size(); ++i ) {
46 ret._elem[i] /= real;
47 }
48
49 return ret;
50}

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const EvtSpinAmp amp 
)

Definition at line 8 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinAmp.cc.

10{
11 vector<int> index = amp.iterinit();
12
13 os << ":";
14 do {
15 os<<"<";
16 for(int i=0; i<index.size()-1; ++i) {
17 os<<index[i];
18 }
19 os<<index[index.size()-1]<<">"<<amp(index)<<":";
20 } while( amp.iterate( index ) );
21
22 return os;
23}