]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenBase/Evt3Rank3C.hh
Fix for definitions for CINT
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / Evt3Rank3C.hh
CommitLineData
da0e9ce3 1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtGen/Evt3Rank3C.hh
12//
13// Description:Class to handle complex 3rd rank 3D tensors
14//
15// Modification history:
16//
17// RYD September 14, 1997 Module created
18//
19//------------------------------------------------------------------------
20
21#ifndef EVT3RANK3C_HH
22#define EVT3RANK3C_HH
23
24#include <iostream>
25#include "EvtGenBase/EvtComplex.hh"
26
27class EvtTensor3C;
28class EvtVector3C;
29class EvtVector3R;
30
31
32class Evt3Rank3C ;
33inline Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2);
34inline Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2);
35inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c);
36inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d);
37inline Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
38inline Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
39Evt3Rank3C directProd(const EvtVector3C& c1,const EvtVector3C& c2,
40 const EvtVector3C& c3);
41Evt3Rank3C conj(const Evt3Rank3C& t2);
42
da0e9ce3 43
44class Evt3Rank3C {
45
46 friend Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2);
47 friend Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2);
48 friend Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c);
49 friend Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d);
50 friend Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
51 friend Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2);
52 friend Evt3Rank3C directProd(const EvtVector3C& c1,const EvtVector3C& c2,
53 const EvtVector3C& c3);
54 friend Evt3Rank3C conj(const Evt3Rank3C& t2);
55
56 friend std::ostream& operator<<(std::ostream& s, const Evt3Rank3C& t2);
57
58public:
59 Evt3Rank3C();
60 Evt3Rank3C(const Evt3Rank3C& t1 );
61 virtual ~Evt3Rank3C();
62 Evt3Rank3C& operator=(const Evt3Rank3C& t1);
63 inline void set(int i,int j,int k,const EvtComplex& c);
64 inline const EvtComplex& get(int i, int j, int k) const;
65 void zero();
66
67
68 Evt3Rank3C& operator+=(const Evt3Rank3C& t2);
69 Evt3Rank3C& operator-=(const Evt3Rank3C& t2);
70 Evt3Rank3C& operator*=(const double d);
71 Evt3Rank3C& operator*=(const EvtComplex& c);
72 Evt3Rank3C conj() const;
73 EvtTensor3C cont1(const EvtVector3C& v) const;
74 EvtTensor3C cont2(const EvtVector3C& v) const;
75 EvtTensor3C cont3(const EvtVector3C& v) const;
76 EvtTensor3C cont1(const EvtVector3R& v) const;
77 EvtTensor3C cont2(const EvtVector3R& v) const;
78 EvtTensor3C cont3(const EvtVector3R& v) const;
79
80
81private:
82
83 EvtComplex t[3][3][3];
84
85};
86
87
88inline Evt3Rank3C operator*(const EvtComplex& c,const Evt3Rank3C& t2){
89 return Evt3Rank3C(t2)*=c;
90}
91
92inline Evt3Rank3C operator*(const double d,const Evt3Rank3C& t2){
93 return Evt3Rank3C(t2)*=d;
94}
95
96inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const EvtComplex& c){
97 return Evt3Rank3C(t2)*=c;
98}
99
100inline Evt3Rank3C operator*(const Evt3Rank3C& t2,const double d){
101 return Evt3Rank3C(t2)*=d;
102}
103
104inline Evt3Rank3C operator+(const Evt3Rank3C& t1,const Evt3Rank3C& t2){
105 return Evt3Rank3C(t1)+=t2;
106}
107
108inline Evt3Rank3C operator-(const Evt3Rank3C& t1,const Evt3Rank3C& t2){
109 return Evt3Rank3C(t1)-=t2;
110}
111
112inline void Evt3Rank3C::set(int i,int j,int k,const EvtComplex& c){
113 t[i][j][k]=c;
114}
115
116inline const EvtComplex& Evt3Rank3C::get(int i,int j,int k) const{
117 return t[i][j][k];
118}
119
120
121#endif
122
123