00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef EVT3RANK3C_HH
00022 #define EVT3RANK3C_HH
00023
00024 #include <iostream>
00025 #include "EvtGenBase/EvtComplex.hh"
00026
00027
00028
00029
00030 class EvtTensor3C;
00031 class EvtVector3C;
00032 class EvtVector3R;
00033
00034
00035 class Evt3Rank3C ;
00036 inline Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2);
00037 inline Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2);
00038 inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c);
00039 inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d);
00040 inline Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
00041 inline Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
00042 Evt3Rank3C directProd(const EvtVector3C& c1,const EvtVector3C& c2,
00043 const EvtVector3C& c3);
00044 Evt3Rank3C conj(const Evt3Rank3C& t2);
00045
00046
00047 class Evt3Rank3C {
00048
00049 friend Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2);
00050 friend Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2);
00051 friend Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c);
00052 friend Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d);
00053 friend Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
00054 friend Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
00055 friend Evt3Rank3C directProd(const EvtVector3C& c1,const EvtVector3C& c2,
00056 const EvtVector3C& c3);
00057 friend Evt3Rank3C conj(const Evt3Rank3C& t2);
00058
00059 public:
00060 Evt3Rank3C();
00061 Evt3Rank3C(const Evt3Rank3C& t1 );
00062 virtual ~Evt3Rank3C();
00063 Evt3Rank3C& operator=(const Evt3Rank3C& t1);
00064 inline void set(int i,int j,int k,const EvtComplex& c);
00065 inline const EvtComplex& get(int i, int j, int k) const;
00066 void zero();
00067
00068 void dump() const;
00069 Evt3Rank3C& operator+=(const Evt3Rank3C& t2);
00070 Evt3Rank3C& operator-=(const Evt3Rank3C& t2);
00071 Evt3Rank3C& operator*=(const double d);
00072 Evt3Rank3C& operator*=(const EvtComplex& c);
00073 Evt3Rank3C conj() const;
00074 EvtTensor3C cont1(const EvtVector3C& v) const;
00075 EvtTensor3C cont2(const EvtVector3C& v) const;
00076 EvtTensor3C cont3(const EvtVector3C& v) const;
00077 EvtTensor3C cont1(const EvtVector3R& v) const;
00078 EvtTensor3C cont2(const EvtVector3R& v) const;
00079 EvtTensor3C cont3(const EvtVector3R& v) const;
00080
00081
00082 private:
00083
00084 EvtComplex t[3][3][3];
00085
00086 };
00087
00088
00089 inline Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2){
00090 return Evt3Rank3C(t2)*=c;
00091 }
00092
00093 inline Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2){
00094 return Evt3Rank3C(t2)*=d;
00095 }
00096
00097 inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c){
00098 return Evt3Rank3C(t2)*=c;
00099 }
00100
00101 inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d){
00102 return Evt3Rank3C(t2)*=d;
00103 }
00104
00105 inline Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2){
00106 return Evt3Rank3C(t1)+=t2;
00107 }
00108
00109 inline Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2){
00110 return Evt3Rank3C(t1)-=t2;
00111 }
00112
00113 inline void Evt3Rank3C::set(int i,int j,int k,const EvtComplex& c){
00114 t[i][j][k]=c;
00115 }
00116
00117 inline const EvtComplex& Evt3Rank3C::get(int i,int j,int k) const{
00118 return t[i][j][k];
00119 }
00120
00121
00122 #endif
00123
00124