BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtSpinAmp.cc File Reference
#include "EvtSpinAmp.hh"
#include "EvtPatches.hh"
#include "EvtReport.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 21 of file EvtSpinAmp.cc.

21 {
22 EvtSpinAmp ret( cont );
23
24 for ( int i = 0; i < ret._elem.size(); ++i ) { ret._elem[i] *= real; }
25
26 return ret;
27}
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)

◆ operator*() [2/2]

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

Definition at line 29 of file EvtSpinAmp.cc.

29{ return real * cont; }

◆ operator/()

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

Definition at line 31 of file EvtSpinAmp.cc.

31 {
32 EvtSpinAmp ret( cont );
33
34 for ( int i = 0; i < ret._elem.size(); ++i ) { ret._elem[i] /= real; }
35
36 return ret;
37}

◆ operator<<()

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

Definition at line 8 of file EvtSpinAmp.cc.

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